Книга: Embedded Linux Primer: A Practical, Real-World Approach

7.4.2. U-Boot Makefile Configuration Target

7.4.2. U-Boot Makefile Configuration Target

Now that we have a code base to start from, we must make some modifications to the top-level U-Boot makefile to add the configuration steps for our new board. Upon examining this makefile, we find a section for configuring the U-Boot source tree for the various supported boards. We now add support for our new one so we can build it. Because we derived our board from the ESD AR405, we will use that rule as the template for building our own. If you follow along in the U-Boot source code, you will see that these rules are placed in the makefile in alphabetical order of their configuration name. We shall be good open-source citizens and follow that lead. We call our configuration target EP405_config, again in concert with the U-Boot conventions.

EBONY_config: unconfig
   @./mkconfig $(@:_config=) ppc ppc4xx ebony
+EP405_config: unconfig
+  @./mkconfig $(@:_config=) ppc ppc4xx ep405
+
ERIC_config: unconfig
   @./mkconfig $(@:_config=) ppc ppc4xx eric

Our new configuration rule has been inserted as shown in the three lines preceded with the + character (unified diff format).

Upon completing the steps just described, we have a U-Boot source tree that represents a starting point. It probably will not even compile cleanly, and that should be our first step. At least the compiler can give us some guidance on where to start.

Оглавление книги


Генерация: 1.132. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз