u-boot: Fix mmc build without target boards

This commit is contained in:
Alexander von Gluck IV
2017-07-10 09:02:56 -05:00
parent 1e82d7bd25
commit 1b3c81feeb
4 changed files with 22 additions and 29 deletions
+6 -1
View File
@@ -234,10 +234,15 @@ rule KernelArchitectureSetup architecture
case arm :
HAIKU_BOOT_PLATFORM ?= u-boot ;
HAIKU_BOARD_LOADER_BASE ?= 0x1000000 ;
HAIKU_BOOT_SDIMAGE_SIZE ?= 128 ;
# SOC's like allwinner need an offset to skip the hardcoded initial loader
HAIKU_BOOT_SDIMAGE_BEGIN = 40950 ; # 512-byte sectors (divisible by 63)
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ;
# offset in floppy image (>= sizeof(haiku_loader))
HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 192 ; # in kB - unused yet
HAIKU_BOOT_LOADER_BASE ?= 0x1000000 ;
case x86 :
HAIKU_BOOT_PLATFORM ?= bios_ia32 ;
-2
View File
@@ -710,7 +710,6 @@ if $(TARGET_PLATFORM) = haiku {
TARGET_BOOT_LIBSUPC++ = $(HAIKU_BOOT_LIBSUPC++_$(TARGET_PACKAGING_ARCH)) ;
TARGET_BOOT_PLATFORM ?= $(HAIKU_BOOT_PLATFORM) ;
TARGET_BOOT_BOARD ?= $(HAIKU_BOOT_BOARD) ;
local architecture ;
for architecture in $(TARGET_PACKAGING_ARCHS) {
@@ -732,7 +731,6 @@ if $(TARGET_PLATFORM) = haiku {
TARGET_BOOT_LIBSUPC++ = ;
TARGET_BOOT_PLATFORM = ;
TARGET_BOOT_BOARD = ;
TARGET_DEFINES_$(TARGET_PACKAGING_ARCH) = ;
# all flags are in TARGET_DEFINES
+16 -24
View File
@@ -11,10 +11,6 @@ UsePrivateHeaders [ FDirName graphics vesa ] ;
UsePrivateHeaders [ FDirName storage ] ;
UsePrivateHeaders [ FDirName kernel arch generic ] ;
# TODO: move this to arch/arm !
UsePrivateHeaders [ FDirName kernel arch $(TARGET_KERNEL_ARCH) board $(TARGET_BOOT_BOARD) ] ;
{
local defines = _BOOT_MODE ;
@@ -164,8 +160,8 @@ rule BuildUBootSDImage image : files
SDIMAGE_MTOOLS_H on $(image) = 255 ;
SDIMAGE_MTOOLS_S on $(image) = 63 ;
SDIMAGE_MTOOLS_C on $(image) = 8 ;
SDIMAGE_SIZE on $(image) = $(HAIKU_BOARD_SDIMAGE_SIZE) ;
SDIMAGE_BEGIN on $(image) = $(HAIKU_BOARD_SDIMAGE_BEGIN:E=63) ;
SDIMAGE_SIZE on $(image) = $(HAIKU_BOOT_SDIMAGE_SIZE) ;
SDIMAGE_BEGIN on $(image) = $(HAIKU_BOOT_SDIMAGE_BEGIN:E=63) ;
BuildUBootSDImage1 $(image) : $(files) ;
}
@@ -234,23 +230,19 @@ actions BlessSDImage1 bind HAIKU_BOARD_SDIMAGE_BOOT0_SEEK HAIKU_BOARD_SDIMAGE_BO
fi
}
HAIKU_BOOT_LOADER_ENTRY_LINUX = `printf \"obase=16;ibase=16;10 + %x\\n\" $(HAIKU_BOOT_LOADER_BASE)|bc` ;
# uimage targets
BuildUImage haiku_loader.ub : haiku_loader :
-A $(TARGET_ARCH) -O $(uImageFakeOS) -T kernel -C none
-a $(HAIKU_BOARD_LOADER_BASE) -e $(HAIKU_BOARD_LOADER_ENTRY_RAW)
-n 'haiku_loader $(TARGET_BOOT_BOARD)' ;
local tgzArchive = haiku-floppyboot.tgz ;
BuildUImage $(tgzArchive).ub : $(tgzArchive) :
-A $(TARGET_ARCH) -O linux -T ramdisk -C none
-n '$(tgzArchive) $(TARGET_BOOT_BOARD)' ;
-n '$(tgzArchive)' ;
BuildUImage haiku_loader_linux.ub : haiku_loader :
BuildUImage haiku_loader.ub : haiku_loader :
-A $(TARGET_ARCH) -O linux -T kernel -C none
-a $(HAIKU_BOARD_LOADER_BASE) -e $(HAIKU_BOARD_LOADER_ENTRY_LINUX)
-n 'haiku_loader $(TARGET_BOOT_BOARD)' ;
-a $(HAIKU_BOOT_LOADER_BASE) -e $(HAIKU_BOOT_LOADER_ENTRY_LINUX)
-n 'haiku_loader' ;
if $(HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT_NAME) {
BuildUImageScript $(HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT_NAME) :
@@ -259,26 +251,26 @@ if $(HAIKU_BOARD_SDIMAGE_UBOOT_SCRIPT_NAME) {
# flash image targets
BuildUBootFlashImage haiku-$(HAIKU_BOOT_BOARD)_flash_image_raw.img : haiku_loader :
BuildUBootFlashImage haiku-$(TARGET_KERNEL_ARCH)_flash_image_raw.img : haiku_loader :
$(FLASH_IMAGE_PARTS) ;
NotFile haiku-flash-image ;
Depends haiku-flash-image : haiku-$(HAIKU_BOOT_BOARD)_flash_image_raw.img ;
Depends haiku-flash-image : haiku-$(TARGET_KERNEL_ARCH)_flash_image_raw.img ;
#BuildUBootFlashImage haiku-$(HAIKU_BOOT_BOARD)_flash_image_elf.img : boot_loader_u-boot :
#BuildUBootFlashImage haiku-$(TARGET_KERNEL_ARCH)_flash_image_elf.img : boot_loader_u-boot :
# $(FLASH_IMAGE_PARTS) ;
#NotFile haiku-flash-elf-image ;
#Depends haiku-flash-elf-image : haiku-$(HAIKU_BOOT_BOARD)_flash_image_elf.img ;
#Depends haiku-flash-elf-image : haiku-$(TARGET_KERNEL_ARCH)_flash_image_elf.img ;
BuildUBootFlashImage haiku-$(HAIKU_BOOT_BOARD)_flash_image_uimage.img : haiku_loader.ub :
BuildUBootFlashImage haiku-$(TARGET_KERNEL_ARCH)_flash_image_uimage.img : haiku_loader.ub :
$(FLASH_IMAGE_PARTS) ;
NotFile haiku-flash-uimage ;
Depends haiku-flash-uimage : haiku-$(HAIKU_BOOT_BOARD)_flash_image_uimage.img ;
Depends haiku-flash-uimage : haiku-$(TARGET_KERNEL_ARCH)_flash_image_uimage.img ;
# SD/mmc image targets
BuildUBootSDImage haiku-$(HAIKU_BOOT_BOARD).mmc : $(HAIKU_IMAGE) $(HAIKU_BOARD_SDIMAGE_FILES) ;
BlessSDImage haiku-$(HAIKU_BOOT_BOARD).mmc ;
BuildUBootSDImage haiku-$(TARGET_KERNEL_ARCH).mmc : $(HAIKU_IMAGE) haiku_loader.ub ;
BlessSDImage haiku-$(TARGET_KERNEL_ARCH).mmc ;
NotFile haiku-mmc-image ;
Depends haiku-mmc-image : haiku-$(HAIKU_BOOT_BOARD).mmc ;
Depends haiku-mmc-image : haiku-$(TARGET_KERNEL_ARCH).mmc ;
SEARCH on [ FGristFiles $(genericPlatformSources) ]
= [ FDirName $(HAIKU_TOP) src system boot platform generic ] ;
-2
View File
@@ -2,8 +2,6 @@ SubDir HAIKU_TOP src system kernel arch arm ;
SubDirHdrs $(SUBDIR) $(DOTDOT) generic ;
UsePrivateKernelHeaders ;
UsePrivateHeaders [ FDirName kernel arch $(TARGET_KERNEL_ARCH) board $(TARGET_BOOT_BOARD) ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) paging ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) paging 32bit ] ;