Add rule to handle uimage, and board-specific stuff to handle load addresses. Need to fix them, u-boot doesn't like loading the file with the header where the header says it should go, must copy to a different address.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32214 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol 2009-08-09 16:40:17 +00:00
parent 91446a1477
commit ac15f9dd16
4 changed files with 34 additions and 3 deletions

View File

@ -36,6 +36,11 @@ KernelMergeObject boot_platform_u-boot.o :
: -fno-pic
;
# include board-specific defs
SubInclude HAIKU_TOP src system boot platform $(TARGET_BOOT_PLATFORM) board ;
# reset SubDir
SubDir HAIKU_TOP src system boot platform u-boot ;
# bootable flash image
rule BuildUBootFlashImage image : haikuLoader : uboot_image {
Depends $(image) : $(haikuLoader) ;
@ -51,8 +56,6 @@ rule BuildUBootFlashImage image : haikuLoader : uboot_image {
actions BuildUBootFlashImage1 {
echo "$(1)"
echo "$(2)"
$(RM) $(<)
# make an empty image
dd if=/dev/zero of=$(<) bs=$(FLASH_IMAGE_BLOCK_SIZE) count=$(FLASH_IMAGE_BLOCK_COUNT)
@ -64,9 +67,23 @@ actions BuildUBootFlashImage1 {
dd if=$(>[1]) of=$(<) bs=$(FLASH_IMAGE_BLOCK_SIZE) conv=notrunc seek=$(FLASH_IMAGE_LOADER_OFFSET)
}
# uImage
rule BuildUImage image : data : args {
Depends $(image) : $(data) ;
LocalClean clean : $(image) ;
MKIMAGE_ARGS on $(image) = $(args) ;
BuildUImage1 $(image) : $(data) ;
}
actions BuildUImage1 {
mkimage $(MKIMAGE_ARGS) -d $(>) $(<)
}
BuildUImage haiku_loader.ub : haiku_loader : "-A arm -O netbsd -T kernel -C none -a $(BOARD_UBOOT_LOADER_ADDRESS) -e $(BOARD_UBOOT_LOADER_ADDRESS) -n 'haiku_loader'" ;
BuildUBootFlashImage haiku_flash_image_raw.img : haiku_loader : $(UBOOT_IMAGE) ;
#BuildUBootFlashImage haiku_flash_image_elf.img : boot_loader_u-boot : $(UBOOT_IMAGE) ;
#BuildUBootFlashImage haiku_flash_image_uimage.img : boot_loader_u-boot_uimage : $(UBOOT_IMAGE) ;
BuildUBootFlashImage haiku_flash_image_uimage.img : haiku_loader.ub : $(UBOOT_IMAGE) ;
SEARCH on [ FGristFiles text_menu.cpp ]
= [ FDirName $(HAIKU_TOP) src system boot platform generic ] ;

View File

@ -0,0 +1,6 @@
SubDir HAIKU_TOP src system boot platform u-boot board ;
if $(TARGET_BOOT_BOARD) {
SubInclude HAIKU_TOP src system boot platform $(TARGET_BOOT_PLATFORM) board $(TARGET_BOOT_BOARD) ;
}

View File

@ -0,0 +1,4 @@
SubDir HAIKU_TOP src system boot platform u-boot board $(TARGET_BOOT_BOARD) ;
BOARD_UBOOT_LOADER_ADDRESS = 0x80008000 ;

View File

@ -0,0 +1,4 @@
SubDir HAIKU_TOP src system boot platform u-boot board $(TARGET_BOOT_BOARD) ;
BOARD_UBOOT_LOADER_ADDRESS = 0xa2000000 ;