<commit_before>KERNCONF=CHROMEBOOK
TARGET_ARCH=armv6
IMAGE_SIZE=$((1024 * 1000 * 1000))
CHROMEBOOK_UBOOT_SRC=${TOPDIR}/u-boot-2014.07

#
# partitions
#
chromebook_partition_image ( ) {
    # disk is gpt
    disk_partition_gpt
    # create ChromeOS partition and put U-Boot on it
    chromebook_uboot_install
    # FreeBSD root
    disk_ufs_create
    # show
 #   gpart show ${DISK_MD}
}
strategy_add $PHASE_PARTITION_LWW chromebook_partition_image

#
# Chromebook uses U-Boot.
#
chromebook_check_uboot ( ) {
    # Crochet needs to build U-Boot.
    uboot_set_patch_version ${CHROMEBOOK_UBOOT_SRC} ${CHROMEBOOK_UBOOT_PATCH_VERSION}

    uboot_test \
        CHROMEBOOK_UBOOT_SRC \
        "$CHROMEBOOK_UBOOT_SRC/board/samsung/smdk5250/Makefile"
    strategy_add $PHASE_BUILD_OTHER uboot_configure $CHROMEBOOK_UBOOT_SRC snow_config
    strategy_add $PHASE_BUILD_OTHER uboot_build $CHROMEBOOK_UBOOT_SRC
}
strategy_add $PHASE_CHECK chromebook_check_uboot

#
# install uboot onto the ChromeOS Kernel parition
#
chromebook_uboot_install ( ) {
    echo Creating ChromeOS Kernel partition
    # Add ChromeOS kernel parition
    CHROMEOS_KERNEL_PARTITION=`gpart add -b 1m -s 15m -t '!fe3a2a5d-4f32-41a7-b725-accc3285a309' /dev/md0 | sed -e 's/ .*//'`
    gpart show /dev/md0
    CHROMEOS_KERNEL_MOUNTPOINT=/dev/${CHROMEOS_KERNEL_PARTITION}
    echo ChromeOS Kernel Mountpoint is ${CHROMEOS_KERNEL_MOUNTPOINT}
    echo Installing U-Boot to ${CHROMEOS_KERNEL_MOUNTPOINT}
    `dd if=${CHROMEBOOK_UBOOT_SRC}/u-boot.bin of=/dev/md0p1`
}

#
# ubldr
#
#strategy_add $PHASE_BUILD_OTHER freebsd_ubldr_build UBLDR_LOADADDR=0x88000000
#strategy_add $PHASE_BOOT_INSTALL freebsd_ubldr_copy_ubldr ubldr

#
# kernel
#
#strategy_add $PHASE_FREEBSD_BOARD_INSTALL board_default_installkernel .
#strategy_add $PHASE_FREEBSD_BOARD_INSTALL freebsd_ubldr_copy_ubldr_help boot

#
# Make a /boot/msdos directory so the running image
# can mount the FAT partition.  (See overlay/etc/fstab.)
#
#strategy_add $PHASE_FREEBSD_BOARD_INSTALL mkdir boot/msdos

#
#  build the u-boot scr file
#
#strategy_add $PHASE_BOOT_INSTALL uboot_mkimage "files/boot.txt" "boot.scr"<commit_msg>dd issue fixed.  Thanks @DamnHippi<commit_after>KERNCONF=CHROMEBOOK
TARGET_ARCH=armv6
IMAGE_SIZE=$((1024 * 1000 * 1000))
CHROMEBOOK_UBOOT_SRC=${TOPDIR}/u-boot-2014.07

#
# partitions
#
chromebook_partition_image ( ) {
    # disk is gpt
    disk_partition_gpt
    # create ChromeOS partition and put U-Boot on it
    chromebook_uboot_install
    # FreeBSD root
    disk_ufs_create
    # show
 #   gpart show ${DISK_MD}
}
strategy_add $PHASE_PARTITION_LWW chromebook_partition_image

#
# Chromebook uses U-Boot.
#
chromebook_check_uboot ( ) {
    # Crochet needs to build U-Boot.
    uboot_set_patch_version ${CHROMEBOOK_UBOOT_SRC} ${CHROMEBOOK_UBOOT_PATCH_VERSION}

    uboot_test \
        CHROMEBOOK_UBOOT_SRC \
        "$CHROMEBOOK_UBOOT_SRC/board/samsung/smdk5250/Makefile"
    strategy_add $PHASE_BUILD_OTHER uboot_configure $CHROMEBOOK_UBOOT_SRC snow_config
    strategy_add $PHASE_BUILD_OTHER uboot_build $CHROMEBOOK_UBOOT_SRC
}
strategy_add $PHASE_CHECK chromebook_check_uboot

#
# install uboot onto the ChromeOS Kernel parition
#
chromebook_uboot_install ( ) {
    echo Creating ChromeOS Kernel partition
    # Add ChromeOS kernel parition
    CHROMEOS_KERNEL_PARTITION=`gpart add -b 1m -s 15m -t '!fe3a2a5d-4f32-41a7-b725-accc3285a309' /dev/md0 | sed -e 's/ .*//'`
    gpart show /dev/md0
    CHROMEOS_KERNEL_MOUNTPOINT=/dev/${CHROMEOS_KERNEL_PARTITION}
    echo ChromeOS Kernel Mountpoint is ${CHROMEOS_KERNEL_MOUNTPOINT}
    echo Installing U-Boot to ${CHROMEOS_KERNEL_MOUNTPOINT}
    `dd if=${CHROMEBOOK_UBOOT_SRC}/u-boot.bin of=/dev/md0p1 bs=1m conv=sync`
}

#
# ubldr
#
#strategy_add $PHASE_BUILD_OTHER freebsd_ubldr_build UBLDR_LOADADDR=0x88000000
#strategy_add $PHASE_BOOT_INSTALL freebsd_ubldr_copy_ubldr ubldr

#
# kernel
#
#strategy_add $PHASE_FREEBSD_BOARD_INSTALL board_default_installkernel .
#strategy_add $PHASE_FREEBSD_BOARD_INSTALL freebsd_ubldr_copy_ubldr_help boot

#
# Make a /boot/msdos directory so the running image
# can mount the FAT partition.  (See overlay/etc/fstab.)
#
#strategy_add $PHASE_FREEBSD_BOARD_INSTALL mkdir boot/msdos

#
#  build the u-boot scr file
#
#strategy_add $PHASE_BOOT_INSTALL uboot_mkimage "files/boot.txt" "boot.scr"
{'fraction_non_alphanumeric': 0.08107482047718323, 'fraction_numerical': 0.027102154273801252, 'mean_word_length': 4.9558620689655175, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3068364', 'n_tokens_mistral': 1831, 'n_tokens_neox': 1706, 'n_words': 307}