|
|
|
Re: How to build linux for my own board? | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
|
Hi!
I'm nearly doing the same thing. In my opinion, it's not needed to make a
new mach-type for AT91. Just create a board file in mach-at91 (take a look
az board-*.c for example) (modify Kbuild and the rest). If you need, I can
provide an example patch file for you.
Defconfig file is not needed, if you configure your kernel by hand, just
don't forget to enable your board in the kernel.
Contact me, if you need more help.
Cheers,
Tom
On Wed, 3 Dec 2008 20:37:36 +0800, "lin liu" <pursuitgospel@xxxxxxxxx>
wrote:
> DA:
>
> I am studying porting Linux to a self-designed board by following
> documents in kernel pachage 2.6.25 and other information on internet.
> Here are my first steps. I am starting at the point of setting up a
> completely same board at91rm9200ek with a new name "mytest".
>
> 1. Setup a testing board type mytest in arch/arm/tools/mach-types.
>
> 2. Copy an existing *_defconfig (I chose at91rm9200ek_defconfig)in
> arch/arm/tools/configs/ to arch/arm/tools/configs/mytest_defconfig,
> remove CONFIG_MACH_AT91RM9200EK, add "CONFIG_ARCH_MYTEST=y".
>
> 3. Add ARCH_MYTEST to all entries have "depend on
> CONFIG_MACH_AT91RM9200EK" in Kconfig files; Add CONFIG_MYTEST to all
> condition blocks that test ARCH_AT91 in Kconfig files.
>
> 4. Copy include/asm-arm/mach-at91 to include/asm-arm/mach-mytest
>
> 5. Copy arch/arm/mach-at91 to arch/arm/mach-mytest and replace
> CONFIG_MACH_AT91RM9200EK with CONFIG_ARCH_MYTEST in
> arch/arm/mach-mytest/Makefile
>
> 6. Run "make ARCH=arm CROSS_COMPILE=arm-linux- mytest_defconfig", then
> I get a .config file that is completely the same asthat of "make
> ARCH=arm CROSS_COMPILE=arm-linux- at91r9200ek_defconfig" except a few
> lines as below (I disabled CONFIG_USB_OHCI_HCD because I had problem
> in compiling it with message "#error "missing bus glue for ohci-hcd").
>
> FYI, ".config.lin" the the new config file for my board, while
> ".config.at91" is that of at91rm9200ek.
> [linux-2.6.25]# diff .config.lin .config.at91
> 4c4
> < # Fri Nov 28 15:18:11 2008
> ---
>> # Fri Nov 28 14:17:54 2008
> 132,133c132,133
> < # CONFIG_ARCH_AT91 is not set
> < CONFIG_ARCH_MYTEST01=y
> ---
>> CONFIG_ARCH_AT91=y
>> # CONFIG_ARCH_LINTST01 is not set
> 838c838,841
> < # CONFIG_USB_OHCI_HCD is not set
> ---
>> CONFIG_USB_OHCI_HCD=y
>> # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
>> # CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
>> CONFIG_USB_OHCI_LITTLE_ENDIAN=y
>
> 7. Make zImage with this new config, everything goes well until ld
> .tmp_vmlinux.
>
> CHK include/linux/compile.h
> UPD include/linux/compile.h
> CC init/version.o
> LD init/built-in.o
> LD .tmp_vmlinux1 arm-linux-ld: no machine record definedarm-linux-ld:
> no machine record defined make: *** [.tmp_vmlinux1] Error 1
>
> Could anybody tell me where the problem is? How should I build it for
> a new machine type? Your comments are highly appreciated.
>
> BTW, building it for at91rm9200ek works w/o error.
>
> Thanks.
> Best Regards.
> -Lin
>
> -------------------------------------------------------------------
> List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
> FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
> Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
[Linux ARM] [Linux ARM MSM] [Linux ARM Kernel] [Fedora ARM] [IETF Annouce] [Security] [Bugtraq] [Linux] [Linux OMAP] [Linux MIPS] [ECOS] [Asterisk Internet PBX] [Linux API]
![]() |
![]() |