read boards from boards.txt.

    :param core_package: 'all,'arduino',..

def boards(hwpack='arduino'):
    """read boards from boards.txt.

    :param core_package: 'all,'arduino',..

    """
    bunch = read_properties(boards_txt(hwpack))

    bunch_items = list(bunch.items())

    # remove invalid boards
    for bid, board in bunch_items:
        if 'build' not in board.keys() or 'name' not in board.keys():
            log.debug('invalid board found: %s', bid)
            del bunch[bid]

    return bunch