summaryrefslogtreecommitdiffstats
path: root/meta-fsl-arm/classes/bbsdcard_image.bbclass
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2012-03-17 20:13:06 +0000
committerOtavio Salvador <otavio@ossystems.com.br>2012-03-21 17:17:16 +0000
commit24b266e156f7b1253c178b856b128c723042ecf6 (patch)
treef74895133137557aacd46d418f9edf69f8cc88e6 /meta-fsl-arm/classes/bbsdcard_image.bbclass
parent886f08469908dd3b64824d48c28d893115e029ea (diff)
downloadmeta-freescale-24b266e156f7b1253c178b856b128c723042ecf6.tar.gz
sdcard_image.bbclass: add support to choose the bootloader to use
The IMAGE_BOOTLOADER variable allows to specific the bootloader to be used. Currently it supports 'u-boot' and 'barebox' as option. Images using the bbsdcard_image.bbclass need to change the image definition to adapt to this. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'meta-fsl-arm/classes/bbsdcard_image.bbclass')
-rw-r--r--meta-fsl-arm/classes/bbsdcard_image.bbclass37
1 files changed, 0 insertions, 37 deletions
diff --git a/meta-fsl-arm/classes/bbsdcard_image.bbclass b/meta-fsl-arm/classes/bbsdcard_image.bbclass
deleted file mode 100644
index 18914d084..000000000
--- a/meta-fsl-arm/classes/bbsdcard_image.bbclass
+++ /dev/null
@@ -1,37 +0,0 @@
1#
2# Create an image that can by written onto a SD card using dd.
3#
4# External variables needed:
5# ${ROOTFS} - the rootfs image to incorporate
6
7# Add the fstypes we need
8IMAGE_FSTYPES += "bbsdimg"
9
10# Ensure required utilities are present
11IMAGE_DEPENDS_bbsdimg = "parted-native virtual/kernel barebox"
12
13# Default to 2GiB images
14BBSDIMG_SIZE ?= "2000"
15
16# Addional space for boot partition
17BOOT_SPACE ?= "5M"
18
19IMAGE_CMD_bbsdimg () {
20 TMP=${WORKDIR}/tmp
21 SDIMG=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.bbsdimg
22
23 if [ -f ${SDIMG} ]; then
24 rm ${SDIMG}
25 fi
26 dd if=/dev/zero of=${SDIMG} bs=$(expr 1000 \* 1000) count=${BBSDIMG_SIZE}
27
28 # Create partition table
29 parted -s ${SDIMG} mklabel msdos
30 parted -s ${SDIMG} mkpart primary ${BOOT_SPACE} 100%
31 parted ${SDIMG} print
32
33 dd if=${DEPLOY_DIR_IMAGE}/barebox-${MACHINE}.bin of=${SDIMG} conv=notrunc seek=1 skip=1 bs=512
34 dd if=${DEPLOY_DIR_IMAGE}/bareboxenv-${MACHINE}.bin of=${SDIMG} conv=notrunc seek=1 bs=512k
35 dd if=${DEPLOY_DIR_IMAGE}/uImage-${MACHINE}.bin of=${SDIMG} conv=notrunc seek=1 bs=1M
36 dd if=${ROOTFS} of=${SDIMG} conv=notrunc seek=1 bs=${BOOT_SPACE}
37}