mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@2432 b08762b0-b915-fc4b-9d8c-17b2551a87ff
51 lines
2.2 KiB
Makefile
51 lines
2.2 KiB
Makefile
#! make -f
|
|
#----------------------------------------------------------------------------
|
|
# Project: TwlIPL
|
|
# File: commondefs.wlanfirm -
|
|
#
|
|
# Copyright 2007 Nintendo. All rights reserved.
|
|
#
|
|
# These coded instructions, statements, and computer programs contain
|
|
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
|
# Company Ltd., and are protected by Federal copyright law. They may
|
|
# not be disclosed to third parties or copied or duplicated in any form,
|
|
# in whole or in part, without the prior written consent of Nintendo.
|
|
#
|
|
# $Date::
|
|
# $Rev:
|
|
# $Author:
|
|
#----------------------------------------------------------------------------
|
|
|
|
MY_WLANFIRM_ROOT = $(TWLWIRELESS_ROOT)/binfile
|
|
MY_WLANFIRM_ROOT_CYG = $(call eupath,$(MY_WLANFIRM_ROOT))
|
|
|
|
MY_WLANFIRM = $(MY_WLANFIRM_ROOT_CYG)/nwm_firm.bin
|
|
|
|
# FWファイルの先頭から160バイト目に入っているバージョン情報を取得
|
|
MY_WLANFIRM_VERSION_MAJOR = $(shell perl -e "open(IN,'$(MY_WLANFIRM)');binmode(IN);seek(IN, 160 + 0, 0);read(IN, \$$buf, 1);print unpack("C", \$$buf);close(IN);")
|
|
MY_WLANFIRM_VERSION_MINOR = $(shell perl -e "open(IN,'$(MY_WLANFIRM)');binmode(IN);seek(IN, 160 + 1, 0);read(IN, \$$buf, 1);print unpack("C", \$$buf);close(IN);")
|
|
|
|
MY_FW_VERSION = $(shell perl -e \
|
|
"open(IN,'$(MY_WLANFIRM)'); \
|
|
binmode(IN); \
|
|
seek(IN, 160 + 4, 0); \
|
|
read(IN, \$$tmp, 4); \
|
|
\$$fwofs = unpack(\"I1\", \$$tmp); \
|
|
seek(IN, \$$fwofs + 1, 0); \
|
|
read(IN, \$$tmp, 1); \
|
|
\$$hwnum = unpack(\"C1\", \$$tmp); \
|
|
seek(IN, \$$fwofs + 2, 0); \
|
|
read(IN, \$$tmp, 2); \
|
|
\$$hwofs = unpack(\"S1\", \$$tmp); \
|
|
seek(IN, \$$fwofs + \$$hwofs + \$$hwnum*8, 0); \
|
|
read(IN, \$$tmp, 4); \
|
|
\$$tmp = unpack(\"N\", \$$tmp); \
|
|
\$$tmp = pack(\"V\", \$$tmp); \
|
|
\$$fwver = unpack(\"H8\", \$$tmp); \
|
|
print \$$fwver; \
|
|
close(IN);" \
|
|
)
|
|
|
|
WLANFIRM_MAKETAD_OPTION += -s -d 0003000F484E4341 3031 $(MY_WLANFIRM_VERSION_MAJOR) WIRELESS_FW -v $(MY_WLANFIRM_VERSION_MINOR) -p
|
|
|