Skip to content

Commit

Permalink
Switch to 4MiB partition boundaries on flash media
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasKaiser committed Oct 24, 2017
1 parent 991b779 commit 4379957
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 18 deletions.
4 changes: 1 addition & 3 deletions config/sources/mvebu64.conf
@@ -1,6 +1,5 @@
ARCH=arm64
KERNEL_IMAGE_TYPE=Image
#OFFSET=2

BOOTSCRIPT="boot-espressobin.cmd:boot.cmd"
UBOOT_TARGET_MAP=";;u-boot.bin flash-image.bin"
Expand All @@ -11,7 +10,6 @@ BOOTBRANCH='branch:u-boot-2017.03-armada-17.10'

UBOOT_USE_GCC='< 7.0'


BOOTENV_FILE='clearfog-default.txt'
HAS_UUID_SUPPORT=yes

Expand Down Expand Up @@ -80,4 +78,4 @@ uboot_custom_postprocess()
make DEBUG=1 USE_COHERENT_MEM=0 LOG_LEVEL=20 SECURE=0 CLOCKSPRESET=CPU_800_DDR_800 DDR_TOPOLOGY=2 BOOTDEV=SPINOR PARTNUM=0 PLAT=a3700 all fip BL33=$SRC/cache/sources/$BOOTDIR/${BOOTBRANCH##*:}/u-boot.bin WTP=../../marvell-tools $CTHREADS CROSS_CM3=$toolchain/$ATF_COMPILER >> $DEST/debug/compilation.log
cp build/a3700/debug/flash-image.bin $ubootdir
cd $ubootdir
}
}
2 changes: 0 additions & 2 deletions config/sources/odroidxu4.conf
@@ -1,5 +1,3 @@
OFFSET=4

BOOTSOURCE='https://github.com/hardkernel/u-boot.git'
BOOTSCRIPT='boot-odroid-xu4-default.ini:boot.ini'
BOOTDIR='u-boot-odroidxu'
Expand Down
1 change: 0 additions & 1 deletion config/sources/sunxi64_common.inc
@@ -1,7 +1,6 @@
ARCH=arm64
KERNEL_IMAGE_TYPE=Image
HAS_UUID_SUPPORT=yes
OFFSET=2
BOOTDELAY=1

# Here we want to rename LINUXFAMILY from sun50iw1, sun50iw2, etc for next and dev branches
Expand Down
2 changes: 1 addition & 1 deletion lib/configuration.sh
Expand Up @@ -53,7 +53,7 @@ MAINLINE_UBOOT_BRANCH='tag:v2017.09'
MAINLINE_UBOOT_DIR='u-boot'

# Let's set default data if not defined in board configuration above
[[ -z $OFFSET ]] && OFFSET=1 # Bootloader space in MB (1 x 2048 = default)
[[ -z $OFFSET ]] && OFFSET=4 # offset to 1st partition (we use 4MiB boundaries by default)
ARCH=armhf
KERNEL_IMAGE_TYPE=zImage
SERIALCON=ttyS0
Expand Down
20 changes: 9 additions & 11 deletions packages/bsp/common/usr/sbin/nand-sata-install
Expand Up @@ -2,12 +2,10 @@
#
# Copyright (c) Authors: http://www.armbian.com/authors
#
# NAND, eMMC, SATA and USB Armbian installer
#
# Remarks:
# nand boot za a10: git clone -b dev/a10-nand-ext4 https://github.com/mmplayer/u-boot-sunxi --depth 1
# Should work with: Cubietruck, Cubieboards, BananaPi, Olimex Lime+Lime2+Micro, Hummingboard, ...
#
# Tool to transfer the rootfs of an already running Armbian installation from SD card
# to NAND, eMMC, SATA or USB storage. In case of eMMC it's also possible to transfer
# the bootloader to eMMC in a single step so from then on running without SD card is
# possible.

# Import:
# DIR: path to u-boot directory
Expand Down Expand Up @@ -172,7 +170,6 @@ create_armbian()
e2fsck -f /dev/nand2 >/dev/null 2>&1
fi


# Boot from eMMC, root = eMMC or SATA / USB
#
if [[ $2 == ${emmccheck}p* || $1 == ${emmccheck}p* ]]; then
Expand Down Expand Up @@ -277,6 +274,7 @@ create_armbian()
umountdevice "/dev/sda"
} # create_armbian


# Accept device as parameter: for example /dev/sda unmounts all their mounts
umountdevice()
{
Expand Down Expand Up @@ -346,9 +344,9 @@ formatemmc()
dialog --title "$title" --backtitle "$backtitle" --infobox "\nFormating $1 to $eMMCFilesystemChoosen ... please wait." 5 60
# we can't boot from btrfs
if [[ $eMMCFilesystemChoosen == "btrfs" ]]; then
parted -s $1 -- mkpart primary $eMMCFilesystemChoosen 2048s 126975s
parted -s $1 -- mkpart primary $eMMCFilesystemChoosen 126976s 389119s
parted -s $1 -- mkpart primary $eMMCFilesystemChoosen 389120s ${LASTSECTOR}s
parted -s $1 -- mkpart primary $eMMCFilesystemChoosen 8192s 139263s
parted -s $1 -- mkpart primary $eMMCFilesystemChoosen 139264s 401407s
parted -s $1 -- mkpart primary $eMMCFilesystemChoosen 401408s ${LASTSECTOR}s
partprobe $1
mkfs.ext4 ${mkopts[ext4]} $1"p1" >> $logfile 2>&1
mkswap $1"p2" >> $logfile 2>&1
Expand All @@ -358,7 +356,7 @@ formatemmc()
emmcuuid=$(blkid -o export $1"p3" | grep -w UUID)
dest_root=$emmccheck"p3"
else
parted -s $1 -- mkpart primary $eMMCFilesystemChoosen 2048s ${LASTSECTOR}s
parted -s $1 -- mkpart primary $eMMCFilesystemChoosen 8192s ${LASTSECTOR}s
partprobe $1
mkfs.${eMMCFilesystemChoosen} ${mkopts[$eMMCFilesystemChoosen]} $1"p1" >> $logfile 2>&1
emmcuuid=$(blkid -o export $1"p1" | grep -w UUID)
Expand Down

0 comments on commit 4379957

Please sign in to comment.