arm: Fix SD Image after haiku_loader changes
* haiku_loader.u-boot doesn't fit in fat32 like haiku_loader.ub * Adjust when writing. Update u-boot scripts to expect new filename * Shrink loader partition to 32M, add our filesystem to end Change-Id: I62936526a7dea2c41e26a7c0f9e05a368622a6a3
This commit is contained in:
@@ -247,7 +247,7 @@ rule KernelArchitectureSetup architecture
|
||||
HAIKU_KERNEL_PLATFORM ?= u-boot ;
|
||||
HAIKU_BOOT_TARGETS += u-boot ;
|
||||
|
||||
HAIKU_BOOT_SDIMAGE_SIZE ?= 128 ;
|
||||
HAIKU_BOOT_SDIMAGE_SIZE ?= 32 ;
|
||||
# SOC's like allwinner need an offset to skip the hardcoded initial loader
|
||||
HAIKU_BOOT_SDIMAGE_BEGIN = 40950 ; # 512-byte sectors (divisible by 63)
|
||||
|
||||
@@ -260,8 +260,8 @@ rule KernelArchitectureSetup architecture
|
||||
# We only need to fill in the FDT dtb
|
||||
HAIKU_MMC_UBOOT_SCRIPT = "\
|
||||
test -e mmc 0 uEnv.txt && fatload mmc 0 ${scriptaddr} uEnv.txt && env import -t ${scriptaddr} ${filesize} \
|
||||
fatload mmc 0 ${kernel_addr_r} haiku_loader.u-boot \
|
||||
fatload mmc 0 ${ramdisk_addr_r} haiku-floppyboot.tgz.u-boot \
|
||||
fatload mmc 0 ${kernel_addr_r} haiku_loader.ub \
|
||||
fatload mmc 0 ${ramdisk_addr_r} haiku_floppyboot.ub \
|
||||
fatload mmc 0 ${fdt_addr_r} ${dtb} \
|
||||
fdt addr ${fdt_addr_r} \
|
||||
bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}" ;
|
||||
@@ -269,7 +269,7 @@ rule KernelArchitectureSetup architecture
|
||||
case arm64 :
|
||||
HAIKU_KERNEL_PLATFORM ?= efi ;
|
||||
|
||||
HAIKU_BOOT_SDIMAGE_SIZE ?= 128 ;
|
||||
HAIKU_BOOT_SDIMAGE_SIZE ?= 32 ;
|
||||
# SOC's like allwinner need an offset to skip the hardcoded initial loader
|
||||
HAIKU_BOOT_SDIMAGE_BEGIN = 40950 ; # 512-byte sectors (divisible by 63)
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ HAIKU_MMC_LABEL ?= $(HAIKU_DEFAULT_MMC_LABEL) ;
|
||||
|
||||
# SD/mmc image rule
|
||||
# requires mtools package on linux
|
||||
# Files must be in this order: loader floppyboot everything_else
|
||||
rule BuildUBootSDImage image : files
|
||||
{
|
||||
Depends $(image) : $(files) $(TARGET_DEVICE_TREES) ;
|
||||
@@ -40,7 +41,13 @@ actions BuildUBootSDImage1
|
||||
# generate u-boot environment variables
|
||||
echo '$(HAIKU_BOARD_SDIMAGE_UBOOT_UENV)' > uEnv.txt
|
||||
# populate
|
||||
MTOOLSRC=$(1).mtools mcopy $(2[1-]) i:
|
||||
$(CP) $(2[2-2]) haiku_loader.ub
|
||||
MTOOLSRC=$(1).mtools mcopy haiku_loader.ub i:
|
||||
$(RM) haiku_loader.ub
|
||||
$(CP) $(2[3-3]) haiku_floppyboot.ub
|
||||
MTOOLSRC=$(1).mtools mcopy haiku_floppyboot.ub i:
|
||||
$(RM) haiku_floppyboot.ub
|
||||
MTOOLSRC=$(1).mtools mcopy $(2[4-]) i:
|
||||
MTOOLSRC=$(1).mtools mcopy uEnv.txt i:
|
||||
# populate fdts
|
||||
MTOOLSRC=$(1).mtools mmd i:\fdt
|
||||
@@ -52,7 +59,7 @@ actions BuildUBootSDImage1
|
||||
$(RM) $(1).mtools
|
||||
$(RM) uEnv.txt
|
||||
# Add haiku bootstrap partition to MMC image
|
||||
#cat $(2[0]) >> $(1)
|
||||
cat $(2[0]) >> $(1)
|
||||
}
|
||||
|
||||
# SD/mmc image targets
|
||||
|
||||
Reference in New Issue
Block a user