mirror of
https://gitlab.com/bztsrc/bootboot.git
synced 2023-02-13 20:54:32 -05:00
Added mmio address to example kernel
This commit is contained in:
parent
02376d2074
commit
c897f2602e
8 changed files with 25 additions and 19 deletions
Binary file not shown.
|
@ -36,14 +36,14 @@ mykernel.x86_64.elf: kernel.c
|
|||
x86_64-elf-gcc $(CFLAGS) -mno-red-zone -c kernel.c -o kernel.o
|
||||
x86_64-elf-ld -r -b binary -o font.o font.psf
|
||||
x86_64-elf-ld -nostdlib -nostartfiles -T link.ld kernel.o font.o -o mykernel.x86_64.elf
|
||||
x86_64-elf-strip -s -K fb -K bootboot -K environment mykernel.x86_64.elf
|
||||
x86_64-elf-strip -s -K mmio -K fb -K bootboot -K environment mykernel.x86_64.elf
|
||||
x86_64-elf-readelf -hls mykernel.x86_64.elf >mykernel.x86_64.txt
|
||||
|
||||
mykernel.aarch64.elf: kernel.c
|
||||
aarch64-elf-gcc $(CFLAGS) -c kernel.c -o kernel.o
|
||||
aarch64-elf-ld -r -b binary -o font.o font.psf
|
||||
aarch64-elf-ld -nostdlib -nostartfiles -T link.ld kernel.o font.o -o mykernel.aarch64.elf
|
||||
aarch64-elf-strip -s -K fb -K bootboot -K environment mykernel.aarch64.elf
|
||||
aarch64-elf-strip -s -K mmio -K fb -K bootboot -K environment mykernel.aarch64.elf
|
||||
aarch64-elf-readelf -hls mykernel.aarch64.elf >mykernel.aarch64.txt
|
||||
|
||||
clean:
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
mmio = 0xfffffffffa000000;
|
||||
mmio = 0xfffffffff8000000;
|
||||
fb = 0xfffffffffc000000;
|
||||
SECTIONS
|
||||
{
|
||||
|
|
Binary file not shown.
|
@ -10,7 +10,7 @@ ELF Header:
|
|||
Version: 0x1
|
||||
Entry point address: 0xffffffffffe02000
|
||||
Start of program headers: 64 (bytes into file)
|
||||
Start of section headers: 3760 (bytes into file)
|
||||
Start of section headers: 3792 (bytes into file)
|
||||
Flags: 0x0
|
||||
Size of this header: 64 (bytes)
|
||||
Size of program headers: 56 (bytes)
|
||||
|
@ -29,7 +29,7 @@ Program Headers:
|
|||
Segment Sections...
|
||||
00 .text .got .got.plt
|
||||
|
||||
Symbol table '.symtab' contains 9 entries:
|
||||
Symbol table '.symtab' contains 10 entries:
|
||||
Num: Value Size Type Bind Vis Ndx Name
|
||||
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
|
||||
1: ffffffffffe02000 0 SECTION LOCAL DEFAULT 1
|
||||
|
@ -40,3 +40,4 @@ Symbol table '.symtab' contains 9 entries:
|
|||
6: ffffffffffe01000 0 NOTYPE GLOBAL DEFAULT 1 environment
|
||||
7: fffffffffc000000 0 NOTYPE GLOBAL DEFAULT ABS fb
|
||||
8: ffffffffffe00000 0 NOTYPE GLOBAL DEFAULT 1 bootboot
|
||||
9: fffffffff8000000 0 NOTYPE GLOBAL DEFAULT ABS mmio
|
||||
|
|
Binary file not shown.
|
@ -10,11 +10,11 @@ ELF Header:
|
|||
Version: 0x1
|
||||
Entry point address: 0xffffffffffe02000
|
||||
Start of program headers: 64 (bytes into file)
|
||||
Start of section headers: 3512 (bytes into file)
|
||||
Start of section headers: 3576 (bytes into file)
|
||||
Flags: 0x0
|
||||
Size of this header: 64 (bytes)
|
||||
Size of program headers: 56 (bytes)
|
||||
Number of program headers: 1
|
||||
Number of program headers: 2
|
||||
Size of section headers: 64 (bytes)
|
||||
Number of section headers: 9
|
||||
Section header string table index: 8
|
||||
|
@ -22,21 +22,25 @@ ELF Header:
|
|||
Program Headers:
|
||||
Type Offset VirtAddr PhysAddr
|
||||
FileSiz MemSiz Flags Align
|
||||
LOAD 0x0000000000000078 0xffffffffffe02000 0xffffffffffe02000
|
||||
0x0000000000000bf0 0x0000000000000bf0 RWE 0x8
|
||||
LOAD 0x00000000000000b0 0x0000000000000000 0x0000000000000000
|
||||
0x0000000000000054 0x0000000000000054 R 0x8
|
||||
LOAD 0x0000000000000108 0xffffffffffe02000 0xffffffffffe02000
|
||||
0x0000000000000b88 0x0000000000000b90 RWE 0x8
|
||||
|
||||
Section to Segment mapping:
|
||||
Segment Sections...
|
||||
00 .text .eh_frame .got.plt
|
||||
00 .eh_frame
|
||||
01 .text .got.plt .bss
|
||||
|
||||
Symbol table '.symtab' contains 9 entries:
|
||||
Symbol table '.symtab' contains 10 entries:
|
||||
Num: Value Size Type Bind Vis Ndx Name
|
||||
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
|
||||
1: ffffffffffe02000 0 SECTION LOCAL DEFAULT 1
|
||||
2: ffffffffffe02b70 0 SECTION LOCAL DEFAULT 2
|
||||
3: ffffffffffe02bd8 0 SECTION LOCAL DEFAULT 3
|
||||
4: ffffffffffe02bf0 0 SECTION LOCAL DEFAULT 4
|
||||
1: 0000000000000000 0 SECTION LOCAL DEFAULT 1
|
||||
2: ffffffffffe02000 0 SECTION LOCAL DEFAULT 2
|
||||
3: ffffffffffe02b70 0 SECTION LOCAL DEFAULT 3
|
||||
4: ffffffffffe02b88 0 SECTION LOCAL DEFAULT 4
|
||||
5: 0000000000000000 0 SECTION LOCAL DEFAULT 5
|
||||
6: ffffffffffe01000 0 NOTYPE GLOBAL DEFAULT 1 environment
|
||||
6: ffffffffffe01000 0 NOTYPE GLOBAL DEFAULT 2 environment
|
||||
7: fffffffffc000000 0 NOTYPE GLOBAL DEFAULT ABS fb
|
||||
8: ffffffffffe00000 0 NOTYPE GLOBAL DEFAULT 1 bootboot
|
||||
8: ffffffffffe00000 0 NOTYPE GLOBAL DEFAULT 2 bootboot
|
||||
9: fffffffff8000000 0 NOTYPE GLOBAL DEFAULT ABS mmio
|
||||
|
|
|
@ -24,10 +24,11 @@
|
|||
;* DEALINGS IN THE SOFTWARE.
|
||||
;*
|
||||
;* This file is part of the BOOTBOOT Protocol package.
|
||||
;* @brief Booting code for BIOS, MultiBoot and El Torito
|
||||
;* @brief Booting code for BIOS, MultiBoot, El Torito, Linux boot
|
||||
;*
|
||||
;* Stage2 loader, compatible with GRUB and BIOS boot specification
|
||||
;* 1.0.1 (even expansion ROM) and El Torito "no emulation" CDROM boot.
|
||||
;* 1.0.1 (even expansion ROM), El Torito "no emulation" CDROM boot,
|
||||
;* as well as Linux boot protocol.
|
||||
;*
|
||||
;* memory occupied: 800-7C00
|
||||
;*
|
||||
|
|
Loading…
Reference in a new issue