7 SRC_otheros_bootloader_loader
=otheros_bootloader_loader.S
8 OBJ_otheros_bootloader_loader
=$(SRC_otheros_bootloader_loader
:.S
=.o
)
9 TARGET_otheros_bootloader_loader
=otheros_bootloader_loader.bin
11 PETITBOOT_IMAGE
=dtbImage.ps3.bin
12 VFLASH_IMAGE
=vflash.bin
13 VFLASH_DEV_DEFAULT
=/dev
/ps3vflashf
14 VFLASH_DEV_LINUX
=/dev
/ps3vflashh1
16 SLL_LOAD_LV2_OFFSET
=0x00165e44
17 LOG2_PAGE_SIZE_OFFSET
=0x000a7dd0 + 0x0000001b0
18 VFLASH_REGION_OFFSET
=0x006b3f80 + 0x00000018
20 $(TARGET_otheros_bootloader_loader
): $(OBJ_otheros_bootloader_loader
)
21 $(OBJCOPY
) -O binary
$^
$@
24 OBJ_mkimage
=$(SRC_mkimage
:.c
=.o
)
25 TARGET_mkimage
=mkimage
27 $(TARGET_mkimage
): $(OBJ_mkimage
)
36 $(VFLASH_IMAGE
): $(TARGET_mkimage
) $(PETITBOOT_IMAGE
)
37 .
/$(TARGET_mkimage
) $(PETITBOOT_IMAGE
) $@
39 install_petitboot_default
: $(VFLASH_IMAGE
)
40 dd if
=$< of
=$(VFLASH_DEV_DEFAULT
) bs
=1 count
=`wc -c $< | awk '{ print $$1 }'`
42 install_petitboot_linux
: $(VFLASH_IMAGE
)
43 dd if
=$< of
=$(VFLASH_DEV_LINUX
) bs
=1 count
=`wc -c $< | awk '{ print $$1 }'`
45 install_bootloader_default
: $(TARGET_otheros_bootloader_loader
)
46 dd if
=$< of
=$(RAM_DEV
) bs
=1 count
=`wc -c $< | awk '{ print $$1 }'` seek
=$$(($(SLL_LOAD_LV2_OFFSET
)))
47 perl
-e
'printf "\x00\x00\x00\x00\x00\x00\x00\x1b"' | \
48 dd of
=$(RAM_DEV
) bs
=1 count
=8 seek
=$$(($(LOG2_PAGE_SIZE_OFFSET
)))
50 install_bootloader_linux
: $(TARGET_otheros_bootloader_loader
)
51 dd if
=$< of
=$(RAM_DEV
) bs
=1 count
=`wc -c $< | awk '{ print $$1 }'` seek
=$$(($(SLL_LOAD_LV2_OFFSET
)))
52 perl
-e
'printf "\x00\x00\x00\x00\x00\x00\x00\x1b"' | \
53 dd of
=$(RAM_DEV
) bs
=1 count
=8 seek
=$$(($(LOG2_PAGE_SIZE_OFFSET
)))
54 perl
-e
'printf "\x00\x00\x00\x00\x00\x00\x00\x07"' | \
55 dd of
=$(RAM_DEV
) bs
=1 count
=8 seek
=$$(($(VFLASH_REGION_OFFSET
)))
59 rm -f
$(OBJ_otheros_bootloader_loader
) $(TARGET_otheros_bootloader_loader
)
60 rm -f
$(OBJ_mkimage
) $(TARGET_mkimage
)