mirror of
https://github.com/thamugadi/powerpc-ofw-boot.git
synced 2025-01-29 17:30:59 +00:00
can now modify frame buffer
This commit is contained in:
parent
45016d0db7
commit
530f9581b3
12
Makefile
12
Makefile
@ -1,6 +1,6 @@
|
||||
PPC=powerpc-linux-gnu
|
||||
DISK.APM: kernel.elf bootinfo.txt kpartx.sh
|
||||
dd bs=8M count=2 if=/dev/zero of=DISK.APM
|
||||
dd bs=512K count=2 if=/dev/zero of=DISK.APM
|
||||
parted DISK.APM --script mklabel mac mkpart primary hfs+ 32.8KB 100%
|
||||
sudo chmod +x kpartx.sh
|
||||
sudo ./kpartx.sh
|
||||
@ -14,11 +14,17 @@ bootinfo.txt: load.fs
|
||||
echo "<chrp-boot><boot-script>" >> bootinfo.txt
|
||||
cat load.fs >> bootinfo.txt
|
||||
echo "</boot-script></chrp-boot>" >> bootinfo.txt
|
||||
kernel.elf: boot.elf boot1.elf
|
||||
kernel.elf: boot.elf boot1.elf
|
||||
$(PPC)-ld -Ttext=0x200000 boot.elf boot1.elf -o kernel.elf
|
||||
boot1.elf: boot.c
|
||||
$(PPC)-gcc -c boot.c -o boot1.elf
|
||||
boot.elf: boot.S
|
||||
$(PPC)-as -c boot.S -o boot.elf
|
||||
clean:
|
||||
rm DISK.APM *elf *txt
|
||||
rm DISK.APM *elf *txt
|
||||
run:
|
||||
qemu-system-ppc DISK.APM
|
||||
debug:
|
||||
qemu-system-ppc DISK.APM -d in_asm
|
||||
all:
|
||||
make clean && make && make run
|
||||
|
9
boot.c
9
boot.c
@ -1,4 +1,11 @@
|
||||
void begin(void)
|
||||
{
|
||||
for(;;){};
|
||||
unsigned char* addr = 0x7FFFFFFF;
|
||||
unsigned char* noise = 0xFFEE0000;
|
||||
while (addr < 0x80500000){
|
||||
*addr = *noise;
|
||||
addr++;
|
||||
noise++;
|
||||
}
|
||||
for(;;);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user