From: "Dr. Patrick Langfeld" <patrick.langfeld@optimeas.de>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: [ptxdist] Crosscompile a WIFI USB stick firmware with ptxdist
Date: Thu, 27 Dec 2012 13:12:28 +0000 [thread overview]
Message-ID: <em4c52ac29-1a5b-4cba-bc10-0cfb711eec71@plh001-think> (raw)
[-- 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
next reply other threads:[~2012-12-27 13:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-27 13:12 Dr. Patrick Langfeld [this message]
2012-12-27 14:01 ` Thomas Petazzoni
2012-12-28 10:00 ` Josef Holzmayr
2012-12-28 16:05 ` Robert Schwebel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=em4c52ac29-1a5b-4cba-bc10-0cfb711eec71@plh001-think \
--to=patrick.langfeld@optimeas.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox