diff --git a/src/ethboot/ethboot.c b/src/ethboot/ethboot.c
index 07b8c3c65f8ae801995a90d3a9e52aeb6d6e235b..a8fb492969b1268f75de32d948d6333a04043c7c 100644 (file)
--- a/src/ethboot/ethboot.c
+++ b/src/ethboot/ethboot.c
#include "ethboot.h"
#include "net.h"
#include "cpmacdrv.h"
+#include "sgmii.h"
#include "device.h"
#include "mdioapi.h"
#include <string.h>
+#include "net_osal.h"
+/**
+ * @brief Remove the possible re-definition of iblEthBoot. iblcfg.h defines this to be a void
+ * statement if there is no ethernet boot support. It must be re-enabled for the compile
+ */
+#ifdef iblEthBoot
+ #undef iblEthBoot
+#endif
/* Convert an IP address from unsigned char to IPN (uint32) */
#define FORM_IPN(x) ( (x[0] << 24) | \
UNFORM_IPN(iblStatus.ethParams.ipAddr, netdev->ip_address);
UNFORM_IPN(iblStatus.ethParams.serverIp, netdev->server_ip);
- memcpy (iblStatus.ethParams.hwAddress, netdev->mac_address, sizeof(iblStatus.ethParams.hwAddress));
+ netMemcpy (iblStatus.ethParams.hwAddress, netdev->mac_address, sizeof(iblStatus.ethParams.hwAddress));
strncpy (iblStatus.ethParams.fileName, netdev->file_name, sizeof(iblStatus.ethParams.fileName));
}
ibl.mdioConfig.mdioClkDiv, ibl.mdioConfig.interDelay);
+ /* SGMII configuration. If sgmii is not present this statement is defined
+ * to void in target.h */
+ hwSgmiiConfig (ibl.ethConfig[eIdx].port, &ibl.sgmiiConfig[eIdx]);
+
+
nDevice.port_num = ibl.ethConfig[eIdx].port;
/* Simple transation to initialize the driver */
- memcpy (nDevice.mac_address, ibl.ethConfig[eIdx].ethInfo.hwAddress, sizeof(nDevice.mac_address));
+ netMemcpy (nDevice.mac_address, ibl.ethConfig[eIdx].ethInfo.hwAddress, sizeof(nDevice.mac_address));
nl = FORM_IPN(ibl.ethConfig[eIdx].ethInfo.ipAddr);
if (ibl.ethConfig[eIdx].doBootp == TRUE)
nDevice.use_bootp_server_ip = ibl.ethConfig[eIdx].useBootpServerIp;
/* Note - the file name structure in nDevice is only 64 bytes, but 128 in ethInfo */
- memcpy (nDevice.file_name, ibl.ethConfig[eIdx].ethInfo.fileName, sizeof(nDevice.file_name));
+ netMemcpy (nDevice.file_name, ibl.ethConfig[eIdx].ethInfo.fileName, sizeof(nDevice.file_name));
nDevice.use_bootp_file_name = ibl.ethConfig[eIdx].useBootpFileName;
}
+
entry = iblBoot (&net_boot_module, format, &ibl.ethConfig[eIdx].blob);