Fix: on board
This commit is contained in:
2
Makefile
2
Makefile
@@ -38,7 +38,7 @@ OBJS := $(SRCS:%=%.o)
|
|||||||
|
|
||||||
.PHONY: all build clean clean_target run kernel debug gdb
|
.PHONY: all build clean clean_target run kernel debug gdb
|
||||||
|
|
||||||
all:
|
all: $(CPIO)
|
||||||
$(MAKE) build TARGET_DIR=./kernel TARGET=kernel8
|
$(MAKE) build TARGET_DIR=./kernel TARGET=kernel8
|
||||||
$(MAKE) build TARGET_DIR=./bootloader TARGET=bootloader
|
$(MAKE) build TARGET_DIR=./bootloader TARGET=bootloader
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ void main(void *dtb)
|
|||||||
uart_puts("waiting for kernel to be sent ..." ENDL);
|
uart_puts("waiting for kernel to be sent ..." ENDL);
|
||||||
|
|
||||||
union {
|
union {
|
||||||
int size;
|
int32_t size;
|
||||||
uint8_t buf[4];
|
uint8_t buf[4];
|
||||||
} kernel_header;
|
} kernel_header;
|
||||||
kernel_header.size = 0;
|
kernel_header.size = 0;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
ENTRY(_start)
|
ENTRY(_start)
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
TEXT (rx) : ORIGIN = 0x80000, LENGTH = 128K
|
TEXT (rx) : ORIGIN = 0x80000, LENGTH = 64K
|
||||||
RO (r) : ORIGIN = 0xa0000, LENGTH = 128K
|
RO (r) : ORIGIN = 0x90000, LENGTH = 16K
|
||||||
DATA (rw) : ORIGIN = 0x100000, LENGTH = 512K
|
DATA (rw) : ORIGIN = 0x94000, LENGTH = 64K
|
||||||
RAM (rw) : ORIGIN = 0x180000, LENGTH = 64M
|
RAM (rw) : ORIGIN = 0xa4000, LENGTH = 64M
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
|
|||||||
BIN
misc/bootcode.bin
Normal file
BIN
misc/bootcode.bin
Normal file
Binary file not shown.
@@ -1,3 +1,4 @@
|
|||||||
initramfs initramfs.cpio 0x20000000
|
initramfs initramfs.cpio
|
||||||
kernel=bootloader.img
|
kernel=bootloader.img
|
||||||
|
enable_uart=1
|
||||||
arm_64bit=1
|
arm_64bit=1
|
||||||
|
|||||||
BIN
misc/fixup.dat
Normal file
BIN
misc/fixup.dat
Normal file
Binary file not shown.
@@ -3,6 +3,8 @@ from pwn import *
|
|||||||
from struct import pack
|
from struct import pack
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
|
|
||||||
|
print(sys.argv)
|
||||||
|
|
||||||
if len(sys.argv) < 2:
|
if len(sys.argv) < 2:
|
||||||
print("no args for serial device")
|
print("no args for serial device")
|
||||||
exit()
|
exit()
|
||||||
@@ -26,5 +28,5 @@ while True:
|
|||||||
|
|
||||||
r.interactive()
|
r.interactive()
|
||||||
|
|
||||||
r.send(b"reboot\n")
|
r.send(b"\nreboot\n")
|
||||||
sleep(1)
|
sleep(10)
|
||||||
|
|||||||
Reference in New Issue
Block a user