Generate symbol lists (kernel.sym with nm and kernel.vsym
with objdump) and a complete disassembly of the finished
kernel image.
This helps with examining how the built kernel image is
actually linked and what parts of the code and data have
ended up where.
This makes the example kernel more educ
Generate gcc temporary files for each object file, showing
the intermediate steps after the C preprocessor and immediately
before assembly.
This helps with examining how the example kernel code is
generated, making the example kernel more educational.
Signed-off-by: Hans Ulrich Niedermann
diff
Even if no one ever does a tarball release of the Multiboot2 spec,
"make distcheck" is a good way of checking the build system's
integrity.
Signed-off-by: Hans Ulrich Niedermann
diff --git a/Makefile.am b/Makefile.am
index 70eec9cd0..38e797aa7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +
Set -nostdlib in CFLAGS and LDFLAGS before AC_PROG_CC if we
appear to be cross-compiling.
This makes the example kernel build work on my x86_64 system
with both
* native compile to generate i386 example kernel
./configure --enable-example-kernel
* cross-compile to generate mips exampl
Always define the kernel_* vars independent of the
BUILD_EXAMPLE_KERNEL conditional. This should make
sure that we actually distribute the kernel sources
even when we are not building the example kernel.
Note that this does not mean we always *build* the
example kernel. EXTRA_PROGRAMS are *not* bu
Generate one listing file *.lst per object file *.o.
This allows easy examination of the generated machine code,
making the example kernel more educational.
Signed-off-by: Hans Ulrich Niedermann
diff --git a/.gitignore b/.gitignore
index e27a3e0e2..7a035c267 100644
--- a/.gitignore
+++ b/.gitig
When building the example kernel for mips, there is a warning
about __start being undefined and some default address being
chosen as start address.
As this does not inspire confidence, we add a __start symbol
at the same place where start and _start are already defined.
Now the mips build builds
Add the boot_mips.S file to the example code documentation.
Before this, while boot_mips.S was the boot code always built,
boot_i386.S was the only documented boot code.
Now both boot_i386.S and boot_mips.S are in the docs, with
the build situation remaining unchanged.
Signed-off-by: Hans Ulrich
Properly align all Multiboot2 header tags to 8 byte
boundaries as per the Multiboot2 specification.
Note that the assembler directive ".align 8" is machine
dependent: On i386, it means "align to 8 byte boundary".
On mips, it means that the lower 8 bits of address must
be zero, i.e. ".align 8" alig
For code consistency and more clarity as to what these .short
and .long values actually are, use the same system for labeling
the terminator header tag as for labeling all other header tags.
This improves the readability of the code, without changing
the actual output.
Signed-off-by: Hans Ulrich
GCC already predefines __ASSEMBLER__ for .S files (assembly with C
preprocessor), so we can just use that instead of defining our own
ASM_FILE macro.
Signed-off-by: Hans Ulrich Niedermann
diff --git a/doc/boot_i386.S b/doc/boot_i386.S
index 14dc14660..2aa2a92b6 100644
--- a/doc/boot_i386.S
+++ b
Clean up the stack after calling C functions according to the
i386 cdecl calling conventions.
Signed-off-by: Hans Ulrich Niedermann
diff --git a/doc/boot_i386.S b/doc/boot_i386.S
index 20a600a6e..14dc14660 100644
--- a/doc/boot_i386.S
+++ b/doc/boot_i386.S
@@ -101,10 +101,12 @@ multiboot_entry:
The file boot.S contains only i386 specific code. Rename the file
to boot_i386.S following the pattern of having the mips specific
code in the boot_mips.S file.
Signed-off-by: Hans Ulrich Niedermann
rename doc/{boot.S => boot_i386.S} (100%)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index
Remove unreferenced AOUT_KLUDGE from both boot_i386.S and
boot_mips.S.
There is no reference in the example kernel to AOUT_KLUDGE or
MULTIBOOT_AOUT_KLUDGE, so this has never had a function in the
Multiboot 2 example kernel.
I presume this was something left over from the Multiboot 1
specification
Choose the arch specific bootcode for i386 or mips, depending
on what --host is being built for.
Before this, boot_i386.S and boot_mips.S were both in the docs,
but boot_mips.S was the boot code always built regardless of the
actual system being built for.
If the --host system is neither i386 (or
Generate a kernel.map map file for the example kernel.
This helps with examining the generated machine code, making
the example kernel more educational.
Signed-off-by: Hans Ulrich Niedermann
diff --git a/.gitignore b/.gitignore
index 7a035c267..889e17f69 100644
--- a/.gitignore
+++ b/.gitignore
Remove the unnecessary separate definition of CC by AC_CHECK_TOOL.
AC_CHECK_TOOL(CC, gcc) might have been necessary back in 1999 when
this line has been written, but AC_PROG_CC has since taken over
defining CC so we do not need AC_CHECK_TOOL for this any more.
Signed-off-by: Hans Ulrich Niederman
In the i386 boot.S file, use the constants with the names
multiboot2.h actually defines them as, and which boot_mips.S
has been using already.
Signed-off-by: Hans Ulrich Niedermann
diff --git a/doc/boot.S b/doc/boot.S
index 8f6f66fcc..9ab016612 100644
--- a/doc/boot.S
+++ b/doc/boot.S
@@ -50,11
Ship the boot_i386.S file in the dist tarball as well, not
just the boot_mips.S file.
Signed-off-by: Hans Ulrich Niedermann
diff --git a/doc/Makefile.am b/doc/Makefile.am
index d9efe8116..e88f4d271 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,5 +1,5 @@
info_TEXINFOS = multiboot.texi
This patch series cleans up the Multiboot2 build system and
example kernel:
* Fix initializing the source tree with autogen.sh when
using current gnulib.
* Change from obsolete .bzrignore to .gitignore.
* Fix the Multiboot2 header tag alignment in the assembly
language boot_*.S fil
The "CLEANFILES = $(noinst_PROGRAMS)" definition is from 2001-01,
and Automake has learned to clean up generated files automatically
since, so we can remove this.
Signed-off-by: Hans Ulrich Niedermann
diff --git a/doc/Makefile.am b/doc/Makefile.am
index a65b452cf..dc7816d9f 100644
--- a/doc/Make
The remark about "older versions of Autoconf" was added in 2001.
We already AC_PREREQ(2.63) which is from 2008, so we need not
worry about pre-2008 versions of Autoconf, much less about
pre-2001 versions.
Signed-off-by: Hans Ulrich Niedermann
diff --git a/configure.ac b/configure.ac
index 5bfc0
In source code comments, change "Multiboot" to "Multiboot2".
This forced us to touch the completely wrongly placed comment
on the 'flags' in multiboot2.h, so we have moved that comment
where it belongs and added comments for the groups of macro
definitions which now had no comments at all.
Signed
Use proper m4 quoting throughout configure.ac and use AS_HELP_STRING
for the --enable-example-kernel argument.
Signed-off-by: Hans Ulrich Niedermann
diff --git a/configure.ac b/configure.ac
index 8f21b1852..5bfc0ee5b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,7 +12,7 @@ dnl "AS IS" COND
The "recent automake" remark is from 2001, and the AM_PROG_AS
issues with CCAS and CCASFLAGS appear to have been solved in
the first half of the 2000s.
Just to make sure, require Automake 1.10.1 which was tagged
on 2008-08-19 which is a similar vintage as the Autoconf 2.63
version which we already
Remove manual dependency line for boot.o.
This line was written in 2001-01. Some time after that, Automake
has gained the capability of automatically tracking source code
dependencies.
Also, the actual object file Automake builds would be called
kernel-boot.o, so a dependency rule for boot.o is u
Add .gitignore file and remove the obsolete .bzrignore file.
As gnulib-tool (called from autogen.sh) insists on creating
doc/.gitignore (if it does not exist) or updating it (if it is
missing some patterns gnulib-tool wants ignored by git), we
add a doc/.gitignore file and the gnulib patterns ther
Current gnulib's gnulib-tool (which is called by autogen.sh)
only runs if configure.ac contains at least AC_PREREQ(2.63).
Requiring Autoconf 2.63 (release tagged in 2008-09) instead of
Autoconf 2.59 (release 2.59 tagged in 2003-11, 2.59d in 2006-06)
should not affect too many systems in 2020.
Si
Hi Daniel,
> Commit d5a32255d (misc: Make grub_strtol() "end" pointers have safer
> const qualifiers) introduced "restrict" keyword into some functions
> definitions. This keyword was introduced in C99 standard. However, some
> compilers by default may use C89 or something different. This behavior
Daniel Kiper writes:
> ..because -iname cannot be used to match paths.
>
> Signed-off-by: Daniel Kiper
> Reviewed-by: Javier Martinez Canillas
> ---
> autogen.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/autogen.sh b/autogen.sh
> index ef43270fc..31b0ced7e 100755
Hi all,
I'm having some trouble with the grub tests run by `make check`.
In particular, grub_func_test is failing for me in every configuration I
try. I've tried various combinations of:
- master, grub-2.04 and grub-2.02 tags, as well as the grub-2.04
tarball.
- configuring for platform em
31 matches
Mail list logo