mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] Crosscompile a WIFI USB stick firmware with ptxdist
@ 2012-12-27 13:12 Dr. Patrick Langfeld
  2012-12-27 14:01 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Dr. Patrick Langfeld @ 2012-12-27 13:12 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 1002 bytes --]

Hello everyone,
I want to use an WIFI USB adapter D-Link DWA-160 with my ARM iMX53.

My kernel is already configured with the wireless LAN components for 
80211 and the driver in Lan USB network adapter using the CARL9170, 
which is the correct one for the DWA-160.

Now the hard part is to crosscompile the firmware carl9170-1.fw for the 
USB network adapter. The sources can be found in a git repository
https://github.com/chunkeey/carl9170fw.git

and come with an autogen.sh script file, which I attached for you to 
have a look at.

Now I am wondering HOW TO PROCEED and implement the build process of 
autogen.sh in ptxdist and which package type is appropriate. Is it a 
./ptx newpackage target or a src-cmake-prog as the autogen.sh makes use 
of cmake.
In the readme file is written, that to build the firmware one would need 
a SH-2 toolchain. Is this also true for cross-compilation? Do I really 
need to build this toolchain first?

Best regards
  Patrick







[-- Attachment #1.2: Type: text/html, Size: 12610 bytes --]

[-- Attachment #2: autogen.sh --]
[-- Type: application/octet-stream, Size: 675 bytes --]

#!/bin/bash

set -e

case "$1" in
	config)
		echo "Configuring..."
		pushd config
		cmake .
		make
		popd
		config/conf Kconfig
		cmake .
	;;

	compile)
		echo "Compile time..."
		make
	;;

	install)
		if [ ! -e .config ]; then
			exit 1
		fi

		. ./.config
		make

		echo -n "Installing firmware..."
		if [ "$CONFIG_CARL9170FW_BUILD_TOOLS" = "y" ] &&
		   [ "$CONFIG_CARL9170FW_BUILD_MINIBOOT" = "y" ]; then
			echo -n "Apply miniboot..."
			tools/src/miniboot a carlfw/carl9170.fw minifw/miniboot.fw
		fi

		sudo install -m 644 carlfw/carl9170.fw \
			/lib/firmware/carl9170-$CONFIG_CARL9170FW_RELEASE_VERSION.fw
		echo "done."
	;;

	*)
		$0 config
		$0 compile
	;;


esac

[-- Attachment #3: CMakeLists.txt --]
[-- Type: text/plain, Size: 418 bytes --]

cmake_minimum_required(VERSION 2.8.4)

project(carl9170)

#if you don't want the full compiler output, remove the following line
#set(CMAKE_VERBOSE_MAKEFILE ON)

include("config.cmake")

add_subdirectory(carlfw)

if (CONFIG_CARL9170FW_BUILD_MINIBOOT)
	add_subdirectory(minifw)
endif (CONFIG_CARL9170FW_BUILD_MINIBOOT)

if (CONFIG_CARL9170FW_BUILD_TOOLS)
	add_subdirectory(tools)
endif (CONFIG_CARL9170FW_BUILD_TOOLS)


[-- Attachment #4: README --]
[-- Type: application/octet-stream, Size: 846 bytes --]

Community AR9170 Linux firmware
-----------------------

This is the firmware for the Atheros ar9170 802.11n devices.

To build the firmware you will need an SH-2 toolchain.
You can build your own toolchain:

make -C toolchain

but be aware that this will take some time and requires
about 2.4 GiB disk space.

The resulting firmware, carl9170.fw, can be used only
with the carl9170 Linux driver.

After getting a toolchain, you will need to get more
tools & libs:

 * gcc 4.7+

 * gperf, bison/flex

 * cmake 2.8.4+

afterwards, simply execute:

autogen.sh

to start the configuration and build process.

if you want to "install" your own firmware, you can either
do this manually, or by executing:
 
autogen.sh install

This will place a copy with the right filename [adds API rev]
into /lib/firmware/[the default path on most Distributions].


[-- Attachment #5: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-28 16:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-27 13:12 [ptxdist] Crosscompile a WIFI USB stick firmware with ptxdist Dr. Patrick Langfeld
2012-12-27 14:01 ` Thomas Petazzoni
2012-12-28 10:00   ` Josef Holzmayr
2012-12-28 16:05     ` Robert Schwebel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox