diff options
| author | Imre Kaloz <kaloz@openwrt.org> | 2008-05-28 19:54:47 +0000 |
|---|---|---|
| committer | Imre Kaloz <kaloz@openwrt.org> | 2008-05-28 19:54:47 +0000 |
| commit | ce3f17dafaeb8bb9ec4f163c7906c1863fc14eb7 (patch) | |
| tree | c938142500ef80b914d0e3978baae5f5bf96edc6 | |
| parent | 197a6c94587f58f85800dbd57de9de28206a34d9 (diff) | |
| download | upstream-ce3f17dafaeb8bb9ec4f163c7906c1863fc14eb7.tar.gz upstream-ce3f17dafaeb8bb9ec4f163c7906c1863fc14eb7.tar.bz2 upstream-ce3f17dafaeb8bb9ec4f163c7906c1863fc14eb7.zip | |
fix up mac address setting on ixp4xx for devices that store this info in the RedBoot config partition
SVN-Revision: 11285
| -rw-r--r-- | target/linux/ixp4xx/Makefile | 2 | ||||
| -rwxr-xr-x | target/linux/ixp4xx/base-files/etc/preinit.arch | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/target/linux/ixp4xx/Makefile b/target/linux/ixp4xx/Makefile index e6b15e537ba..7b95752cbe3 100644 --- a/target/linux/ixp4xx/Makefile +++ b/target/linux/ixp4xx/Makefile @@ -22,6 +22,6 @@ define Kernel/Configure $(if $(CONFIG_EABI_SUPPORT),echo '# CONFIG_OABI_COMPAT is not set' >> $(LINUX_DIR)/.config) endef -DEFAULT_PACKAGES += ixp4xx-microcode +DEFAULT_PACKAGES += ixp4xx-microcode fconfig $(eval $(call BuildTarget)) diff --git a/target/linux/ixp4xx/base-files/etc/preinit.arch b/target/linux/ixp4xx/base-files/etc/preinit.arch new file mode 100755 index 00000000000..1ee1d7404dd --- /dev/null +++ b/target/linux/ixp4xx/base-files/etc/preinit.arch @@ -0,0 +1,8 @@ +RB_CONFIG="$(grep "RedBoot config" /proc/mtd | cut -d: -f1)" + +for npe in eth0 eth1 +do + if [ "$(ifconfig $npe 2>/dev/null | grep -c 00:00:00:00:00:00)" == "1" ]; then + ifconfig $npe hw ether $(fconfig -s -r -d /dev/$RB_CONFIG -n npe_"$npe"_esa) + fi +done |
