mirror of
https://github.com/thamugadi/powerpc-ofw-boot.git
synced 2024-06-04 07:29:28 +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
|
PPC=powerpc-linux-gnu
|
||||||
DISK.APM: kernel.elf bootinfo.txt kpartx.sh
|
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%
|
parted DISK.APM --script mklabel mac mkpart primary hfs+ 32.8KB 100%
|
||||||
sudo chmod +x kpartx.sh
|
sudo chmod +x kpartx.sh
|
||||||
sudo ./kpartx.sh
|
sudo ./kpartx.sh
|
||||||
|
@ -14,11 +14,17 @@ bootinfo.txt: load.fs
|
||||||
echo "<chrp-boot><boot-script>" >> bootinfo.txt
|
echo "<chrp-boot><boot-script>" >> bootinfo.txt
|
||||||
cat load.fs >> bootinfo.txt
|
cat load.fs >> bootinfo.txt
|
||||||
echo "</boot-script></chrp-boot>" >> 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
|
$(PPC)-ld -Ttext=0x200000 boot.elf boot1.elf -o kernel.elf
|
||||||
boot1.elf: boot.c
|
boot1.elf: boot.c
|
||||||
$(PPC)-gcc -c boot.c -o boot1.elf
|
$(PPC)-gcc -c boot.c -o boot1.elf
|
||||||
boot.elf: boot.S
|
boot.elf: boot.S
|
||||||
$(PPC)-as -c boot.S -o boot.elf
|
$(PPC)-as -c boot.S -o boot.elf
|
||||||
clean:
|
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
|
||||||
|
|
2
boot.S
2
boot.S
|
@ -1,4 +1,4 @@
|
||||||
.globl _start
|
.globl _start
|
||||||
_start:
|
_start:
|
||||||
addi 1,1,1
|
addi 1,1,1
|
||||||
b begin
|
b begin
|
||||||
|
|
9
boot.c
9
boot.c
|
@ -1,4 +1,11 @@
|
||||||
void begin(void)
|
void begin(void)
|
||||||
{
|
{
|
||||||
for(;;){};
|
unsigned char* addr = 0x7FFFFFFF;
|
||||||
|
unsigned char* noise = 0xFFEE0000;
|
||||||
|
while (addr < 0x80500000){
|
||||||
|
*addr = *noise;
|
||||||
|
addr++;
|
||||||
|
noise++;
|
||||||
|
}
|
||||||
|
for(;;);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user