<commit_before>DESCRIPTION = "Lowlevel - a simple bootloader for the Toshiba Topas 910."
SECTION = "bootloaders"
PRIORITY = "optional"
LICENSE = "BSD"
PROVIDES = "virtual/bootloader"
DEPENDS = "virtual/kernel"
PR = "r0"

ALLOW_EMTPTY = "1"



do_install () {
}

do_deploy () {

# see http://git.labs.kernelconcepts.de/?p=tools.git;a=blob;f=scripts/mkimg-topas.sh;h=3b3b88f0584c4a1850bb45986f8b4dcb23496b95;hb=HEAD

	#256k u-boot, 128k environment, kernel, fs 
	dd if=/dev/zero of=/tmp/pad bs=1024k count=20
	cat ${DEPLOY_DIR_IMAGE}/u-boot-topas910.bin /tmp/pad > /tmp/pad1
	dd if=/tmp/pad1 of=/tmp/pad2 bs=1k count=384
	cat /tmp/pad2 ${DEPLOY_DIR_IMAGE}/uImage-topas910.bin > flashimage-topas910.bin
	rm /tmp/pad1
	rm /tmp/pad2

	cat flashimage-topas910.bin /tmp/pad > /tmp/flashimage-topas910.bin.pad
	dd if=/tmp/flashimage-topas910.bin.pad of=flashimage-topas910.bin.pad2 bs=1k count=5504
	rm /tmp/flashimage-topas910.bin.pad
#	cat flashimage-topas910.bin.pad2 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 /tmp/pad > /tmp/flashimage-topas910.bin.pad3
	cat flashimage-topas910.bin.pad2 /home/devel/toshiba2/angstrom-oe-dev/deploy/glibc/images/topas910/Angstrom-mobos-image-glibc-ipk-2009.X-test-20100304-topas910.rootfs.jffs2 /tmp/pad > /tmp/flashimage-topas910.bin.pad3
	dd if=/tmp/flashimage-topas910.bin.pad3 of=${DEPLOY_DIR_IMAGE}/topas910-uboot-kernel-fs_nor.img bs=1024k count=32
	rm flashimage-topas910.bin.pad*
	rm /tmp/pad
}
<commit_msg>Topas910: Build flash image with u-boot, kernel, root-fs<commit_after>DESCRIPTION = "Lowlevel - a simple bootloader for the Toshiba Topas 910."
SECTION = "bootloaders"
PRIORITY = "optional"
LICENSE = "BSD"
PROVIDES = "virtual/bootloader"
DEPENDS = "virtual/kernel"
PR = "r0"

ALLOW_EMTPTY = "1"



do_install () {
}

do_deploy () {

# see http://git.labs.kernelconcepts.de/?p=tools.git;a=blob;f=scripts/mkimg-topas.sh;h=3b3b88f0584c4a1850bb45986f8b4dcb23496b95;hb=HEAD

	# /tmp/pad is a 20MB block with 0 and nothing else
	dd if=/dev/zero of=/tmp/pad bs=1024k count=20
	cat ${DEPLOY_DIR_IMAGE}/u-boot-topas910.bin /tmp/pad > /tmp/pad1
	#256k u-boot + 128k environment = 384k
	dd if=/tmp/pad1 of=/tmp/pad2 bs=1k count=384

	# combine u-boot and uImage
	cat /tmp/pad2 ${DEPLOY_DIR_IMAGE}/uImage-topas910.bin > flashimage-topas910.bin
	rm /tmp/pad1
	rm /tmp/pad2

	cat flashimage-topas910.bin /tmp/pad > /tmp/flashimage-topas910.bin.pad
	dd if=/tmp/flashimage-topas910.bin.pad of=flashimage-topas910.bin.pad2 bs=1k count=5504
	rm /tmp/flashimage-topas910.bin.pad
	
	# find out the *.jffs filename - check for the latest jffs2 file (there could be more than one)
	JFFS_MY_IMAGE_FILENAME=`ls -1tr ${DEPLOY_DIR_IMAGE}/*.jffs2 2>/dev/null | tail -n1`
	if [ "x$JFFS_MY_IMAGE_FILENAME" = "x" ]; then
		# no filename found
	        exit 1
	fi

	cat flashimage-topas910.bin.pad2 ${JFFS_MY_IMAGE_FILENAME} /tmp/pad > /tmp/flashimage-topas910.bin.pad3
	
	# cut the image at the end - minimum: 5504k (see dd above) + size of .jffs file
	dd if=/tmp/flashimage-topas910.bin.pad3 of=${DEPLOY_DIR_IMAGE}/topas910-uboot-kernel-fs_nor.img bs=1024k count=12
	rm flashimage-topas910.bin.pad*
	rm /tmp/pad
}

{'fraction_non_alphanumeric': 0.1381620931716656, 'fraction_numerical': 0.08423739629865985, 'mean_word_length': 4.32258064516129, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1214064', 'n_tokens_mistral': 1536, 'n_tokens_neox': 1330, 'n_words': 235}