Exhibit 10.4

AMENDMENT AND WAIVER

AMENDMENT AND WAIVER, dated as of January 10, 2007 (this “Amendment”), to and
under that certain Credit Agreement, dated as of December 2, 2005 (as heretofore
amended, supplemented or otherwise modified, the “Credit Agreement”), among
SunPower Corporation (the “Borrower”), the several lenders from time to time
parties to the Credit Agreement (the “Lenders”), and Credit Suisse, Cayman
Islands Branch, as administrative agent for the Lenders (in such capacity, the
“Administrative Agent”).

W I T N E S S E T H :

WHEREAS, the Borrower, the Lenders, and the Administrative Agent are parties to
the Credit Agreement;

WHEREAS, the Borrower has entered into that certain Agreement and Plan of
Merger, dated as of November 15, 2006 (as amended by (i) that certain First
Amendment to Agreement and Plan of Merger, dated as of December 21, 2006 and
(ii) that certain side letter agreement dated as of January 10, 2007), by and
among Borrower, Pluto Acquisition Company LLC (to be renamed PowerLight LLC in
connection with the Merger described below) (the “Merger Sub”), PowerLight
Corporation (the “Target”) and Thomas L. Dinwoodie, as shareholders’
representative (the “Merger Agreement”), pursuant to which the Target merged
into the Merger Sub with the Merger Sub continuing as the surviving company (the
“Merger”);

WHEREAS, Merger Sub is a wholly owned subsidiary of the Borrower and a Group
Member under the Credit Agreement;

WHEREAS, Merger Sub is party to that certain Loan Agreement, dated as of
January 10, 2007, among the Target and Union Bank of California, N.A. (the
“Union Bank Loan Agreement”) providing for extensions of credit in an aggregate
amount not to exceed $10,000,000 and which shall terminate on April 30, 2007
(the “Union Bank Termination Date”);

WHEREAS, the Borrower has requested that the Lenders agree to waive compliance,
with certain requirements of the Credit Agreement;

WHEREAS, the Borrower intends to issue convertible debt securities in an amount
not to exceed $200,000,000 with terms reasonably satisfactory to the
Administrative Agent (the “Convertible Debt”);

WHEREAS, in connection with the issuance of the Convertible Debt, the Borrower
has requested that the Lenders agree to amend the Credit Agreement to permit the
incurrence of the Convertible Debt by the Borrower; and

--------------------------------------------------------------------------------

2

WHEREAS, the Required Lenders and Administrative Agent have agreed to amend the
Credit Agreement and grant the waivers as provided herein upon the terms and
subject to the conditions set forth herein;

NOW, THEREFORE, in consideration of the premises and the mutual agreements
contained herein, and for other valuable consideration the receipt of which is
hereby acknowledged, the Borrower, the Lenders, and the Administrative Agent
agree as follows:

SECTION 1. DEFINITIONS. Unless otherwise defined herein, capitalized terms are
used herein as defined in the Credit Agreement.

SECTION 2. WAIVER.

2.1      The Lenders hereby waive the compliance with the provisions of the
following Subsections of the Credit Agreement as they relate to the Merger and
Merger Agreement: Subsection 7.3 (Fundamental Changes), Subsection 7.6
(Investments) and Subsection 7.12 (Lines of Business).

2.2      The Lenders hereby waive the compliance with the provisions of the
following Subsections of the Credit Agreement with respect to the Union Bank
Loan Agreement, until the Union Bank Termination Date, solely as such
Subsections relate to the Target and its subsidiaries (and subsequent to the
Merger, Merger Sub and its subsidiaries) (collectively, the “Powerlight Group”):
Subsection 4.8 (Ownership of Property; Liens), Subsection 6.8 (Additional
Collateral, etc.), Subsection 7.1 (Indebtedness), Subsection 7.2 (Liens),
Subsection 7.4 (Disposition of Property), Subsection 7.5 (Restricted Payments),
Subsection 7.7 (Transactions with Affiliates), Subsection 7.10 (Negative Pledge
Clauses) and Subsection 7.11 (Clauses Restricting Subsidiary Distributions).

2.3      Until the Union Bank Termination Date, the Lenders hereby agree that:

(a)      no member of the Powerlight Group shall (i) be deemed a Subsidiary
Guarantor or be required to become a party to the Guaranty and Collateral
Agreement or any other Security Document, or (ii) be required to pledge, or
grant a security interest in, any of its property; and

(b)      notwithstanding Section 7.6 of the Credit Agreement, the Borrower may
make Investments in the Powerlight Group in an amount not to exceed $15,000,000
in addition to other Investments permitted under Section 7.6 of the Credit
Agreement (collectively, the “Other Investment Baskets”); provided that until
(i) the Union Bank Termination Date and (ii) such time as Merger Sub has become
a Subsidiary Guarantor and complied with the provisions of Section 6.8 of the
Credit Agreement, no more than $10,000,000 in the aggregate of the Other
Investment Baskets may be utilized to make any Investments in the Powerlight
Group.

SECTION 3. AMENDMENT.

3.1 Amendment to Subsection 7.1. Subsection 7.1 of the Credit Agreement is
hereby amended by (i) deleting the word “and” at the end of paragraph (g) in
such

--------------------------------------------------------------------------------

3

subsection, (ii) deleting the period at the end of paragraph (h) in such
subsection and inserting in lieu thereof “; and” and (iii) adding at the end
thereof immediately after paragraph (h) in such subsection the following:

“(i) additional Indebtedness in connection with convertible debt securities to
be issued by the Borrower in an amount not to exceed $200,000,000 with terms
reasonably satisfactory to the Administrative Agent (the “Convertible Debt”).”

3.2 Amendment to Subsection 7.5. Subsection 7.5 of the Credit Agreement is
hereby amended by (i) deleting the word “and” at the end of paragraph (b) in
such subsection, (ii) deleting the period at the end of paragraph (c) in such
subsection and inserting in lieu thereof “; and” and (iii) adding at the end
thereof immediately after paragraph (c) in such subsection the following:

“(d) So long as no Default or Event of Default has occurred and is continuing,
the Borrower may make Restricted Payments to the holders of the Convertible Debt
to the extent necessary to permit the exercise of such holders’ conversion
rights pursuant to such Convertible Debt, as such conversion rights are in
effect at the time the Convertible Debt is issued.”

SECTION 4. CONDITIONS PRECEDENT.

4.1 Effective Date. This Amendment shall become effective as of the date first
set forth above (the “Amendment Effective Date”) following the date on which all
of the following conditions have been satisfied or waived:

(a) Execution and Delivery. The Administrative Agent shall have received
counterparts of this Amendment duly executed by (i) the Borrower and (ii) the
Required Lenders;

(b) After giving effect to this Amendment, no Default or Event of Default shall
have occurred and be continuing;

(c) The Merger shall have been consummated pursuant to documentation
substantially consistent with the Merger Agreement.

SECTION 5. GENERAL.

5.1 Representations and Warranties.

(a) In order to induce the Administrative Agent and the Lenders to enter into
this Amendment, the Borrower hereby represents and warrants to the
Administrative Agent and the Lenders that after giving effect to this Amendment,
the representations and warranties of the Borrower contained in the Credit
Agreement and the other Loan Documents are true and correct in all material
respects on and as of the Amendment Effective Date and on and as of the date
when the conditions precedent set forth in Section 4 have been satisfied (in
each case, after giving effect hereto) as if made on and as of the Amendment
Effective Date and on and as of the date when the conditions precedent set forth
in Section 4 have been satisfied (except where such representations and
warranties expressly relate to an earlier date in which

--------------------------------------------------------------------------------

4

case such representations and warranties were true and correct in all material
respects as of such earlier date); provided that (x) all references to the
“Credit Agreement” in any Credit Document shall be and are deemed to mean the
Credit Agreement as amended hereby.

(b) In order to induce the Administrative Agent and the Lenders to enter into
this Amendment, the Borrower hereby represents and warrants to the
Administrative Agent and the Lenders that the Borrower has all necessary
corporate power and authority to execute and deliver this Amendment; the
execution and delivery by the Borrower of this Amendment has been duly
authorized by all necessary corporate action on its part; and this Amendment has
been duly executed and delivered by the Borrower and constitute the Borrower’s
legal, valid and binding obligation, enforceable in accordance with its terms.

5.2 Pledge of Equity . No later than February 15, 2007 (or such later date as
the Administrative Agent shall agree in its sole discretion), the Borrower shall
deliver to the Administrative Agent the certificates (if any) representing the
Capital Stock of Merger Sub, together with undated powers, in blank, executed
and delivered by a duly authorized officer of the Borrower.

5.3 Miscellaneous.

(a) From and after the effectiveness of this Amendment, each of the Loan
Documents, including the Credit Agreement, and any and all other agreements,
documents or instruments now or hereafter executed and/or delivered pursuant to
the terms of the Credit Agreement as amended hereby, are hereby amended so that
any reference in such Loan Documents to the Credit Agreement, whether direct or
indirect, and each reference in the Credit Agreement to “this Agreement,”
“hereof,” “herein,” “hereby” or words of like import, shall be deemed to be a
reference to the Credit Agreement as amended hereby. This Amendment shall
constitute a Loan Document under the Credit Agreement.

(b) Except as amended hereby, the Credit Agreement shall continue to be and
shall remain in full force and effect in accordance with its terms, and nothing
in this Amendment shall be deemed to constitute a waiver of compliance by any
Loan Party with respect to any other term or provision of any Loan Document.

(c) This Amendment may be executed in any number of counterparts and by
different parties hereto in separate counterparts, each of which when so
executed and delivered shall be deemed an original, but all such counterparts
together shall constitute but one and the same instrument.

(d) Section headings used in this Amendment are for convenience of reference
only, are not part of this Amendment and are not to affect the constructions of,
or to be taken into consideration in interpreting, this Amendment

(e) THIS AMENDMENT SHALL BE GOVERNED BY, AND CONSTRUED AND INTERPRETED IN
ACCORDANCE WITH, THE LAWS OF THE STATE OF NEW YORK.

--------------------------------------------------------------------------------

5

[signature page follows].

--------------------------------------------------------------------------------

IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be executed
and delivered by their respective duly authorized officers as of the date first
above written.

 

SUNPOWER CORPORATION, as Borrower By:   /Emmanuel T. Hernandez/   Name: Emmanuel
T. Hernandez   Title:   Chief Financial Officer

CREDIT SUISSE, CAYMAN ISLANDS

BRANCH,

as Administrative Agent and as a Lender

By:   /S/ [Illegible]                                   Name:   Title: By:   /S/
[Illegible]                                   Name:   Title:

LEHMAN COMMERCIAL PAPER INC.,

as a Lender

By:   /S/ [Illegible]                                   Name:   Title: