Mini6410: Free Board Support Package released

Juergen Beisert
Pengutronix offers a free Board Support Package for the popular
FriendlyARM's Mini6410. It provides most of the required components to get
this embedded target up and running. But this one is not a full featured
Board Support Package yet. That's why it's yet dedicated for experienced
users.
Future releases will complete it more an more, to support beginners in the
embedded world using the Mini6410 as well.

Feature List:
-------------

- PTXdist-2011.07.0 based buildsystem for easy setup and build [1]
- recent GCC Toolchain (GCC 4.5.2, libc 2.13) for ARM11 [2]
- Kernel: Recent 2.6.39 Linux (includes stable release .3)
  Support for the following list of hardware components
  - serial console
  - network
  - LED
  - GPIO
  - AD converter
  - I2C + EEPROM
  - Real time clock
  - two LC displays
  - framebuffer
  - touchscreen
- more than one predefined configuration
  - one without graphic, for headless usage
  - one with full blown Qt support including an example how to use it 
- Basic documentation how to prepare and build all software components

Additional info can be found here:

http://www.oselas.org/oselas/bsp/pengutronix/index_en.html

Comments are welcome.

[1] http://www.oselas.org/software/ptxdist/index_en.html
[2] http://www.oselas.org/oselas/toolchain/index_en.html

Juergen Beisert
For the interested: I just uploaded the Linux-3.0 support for the Mini6410
to the well known repository. This is not a release yet. So, testers are
welcome.

Juergen Beisert
For the interested: I just uploaded high resolution timer support for this
platform. This is one important step to make RT-Preempt work.

Ann R. (Russia)
Unable to compile the kernel. Get the following errors:

----------------------
target: kernel.compile
----------------------

cd
/usr/local/lib/ptxdist-2011.08.0/projects/OSELAS.BSP-Pengutronix-Mini6410-2011.0
7.0/platform-mini6410/build-target/linux-2.6.39
&&
PATH=/usr/local/lib/ptxdist-2011.08.0/projects/OSELAS.BSP-Pengutronix-Mini6410-2
011.07.0/platform-mini6410/sysroot-cross/bin:/usr/local/lib/ptxdist-2011.08.0/pr
ojects/OSELAS.BSP-Pengutronix-Mini6410-2011.07.0/platform-mini6410/sysroot-cross
/sbin:$PATH
KCONFIG_NOTIMESTAMP=1 make \
        -j4 HOSTCC=gcc ARCH=arm CROSS_COMPILE=arm-1136jfs-linux-gnueabi-
INSTALL_MOD_PATH=/usr/local/lib/ptxdist-2011.08.0/projects/OSELAS.BSP-Pengutroni
x-Mini6410-2011.07.0/platform-mini6410/packages/linux-2.6.39
PTX_KERNEL_DIR=/usr/local/lib/ptxdist-2011.08.0/projects/OSELAS.BSP-Pengutronix-Mini6410-2011.0
7.0/platform-mini6410/build-target/linux-2.6.39
CONFIG_DEBUG_SECTION_MISMATCH=y
DEPMOD=/usr/local/lib/ptxdist-2011.08.0/projects/OSELAS.BSP-Pengutronix-Mini6410
-2011.07.0/platform-mini6410/sysroot-cross/sbin/arm-1136jfs-linux-gnueabi-depmod

uImage "modules"
make[1]: Entering directory
`/usr/local/lib/ptxdist-2011.08.0/projects/OSELAS.BSP-Pengutronix-Mini6410-2011.
07.0/platform-mini6410/build-target/linux-2.6.39'
scripts/kconfig/conf --silentoldconfig Kconfig
warning: (ARCH_LPC32XX && ARCH_S3C64XX && ARCH_TCC8K) selects
USB_ARCH_HAS_OHCI which has unmet direct dependencies (USB_SUPPORT)
include/config/auto.conf:68:warning: symbol value 'elf32-i386' invalid for
OUTPUT_FORMAT
include/config/auto.conf:96:warning: symbol value
'arch/x86/configs/i386_defconfig' invalid for ARCH_DEFCONFIG
include/config/auto.conf:221:warning: symbol value '-fcall-saved-ecx
-fcall-saved-edx' invalid for ARCH_HWEIGHT_CFLAGS
warning: (ARCH_LPC32XX && ARCH_S3C64XX && ARCH_TCC8K) selects
USB_ARCH_HAS_OHCI which has unmet direct dependencies (USB_SUPPORT)

*** Error during update of the configuration.

make[3]: *** [silentoldconfig] Error 1
make[2]: *** [silentoldconfig] Error 2
make[1]: *** No rule to make target `include/config/auto.conf', needed by
`include/config/kernel.release'.  Stop.
make[1]: Leaving directory
`/usr/local/lib/ptxdist-2011.08.0/projects/OSELAS.BSP-Pengutronix-Mini6410-2011.
07.0/platform-mini6410/build-target/linux-2.6.39'
make: ***
[/usr/local/lib/ptxdist-2011.08.0/projects/OSELAS.BSP-Pengutronix-Mini6410-2011.
07.0/platform-mini6410/state/kernel.compile]
Error 2

Juergen Beisert
Did you build the whole BSP or did you try to build the kernel component
only? It seems the buildsystem was confused by a manual change.
Try the following:
 - clean the kernel component: ptxdist clean kernel
 - configure the kernel if you want: ptxdist menuconfig kernel
 - build the kernel: ptxdist targetinstall kernel

This should give you the file "platform-mini6410/images/linuximage".

Ann R. (Russia)
Thanx! That's ok.
But what about yaffs2 support? I used milkymist-rtems-yaffs2-3849a10 kernel
patch, but the compiled kernel still can't see init script.

May be it is possible to include the older kernel with yaffs2 to bsp?

Juergen Beisert
Yes, that is possible.

Run "ptxdist platformconfig" and change the used linux version to your
need. Then add a subfolder with the patch stack that is required to change
this vanilla kernel to the kernel you need
(configs/platform-friendlyarm-mini2440/patches/). Follow the style the
other subfolders in this directory are using.
As a last step add your kernel config to
"configs/platform-friendlyarm-mini2440". All these components make PTXdist
building your kernel the next time your run "ptxdist go". What PTXdist is
doing in your case:
 - download the vanilla sources and extract them
 - apply the patch stack in
"configs/platform-friendlyarm-mini2440/patches/linux-<anns-yaffs-patches>"
according to the "series" file in this directory
 - configure and build this kernel with the defines kernel config

If you send me the required patch stack for this kernel I can add it to the
BSP's repository for reference.

Ann R. (Russia)
I used this - https://github.com/milkymist/rtems-yaffs2/ to add yaffs
support to kernel. And this patch
http://www.aleph1.co.uk/lurker/message/20110603.135250.634d89fa.en.html.

But the compiled kernel doesn't work :(. Can you look at it please?

/sbin/init is in rootfs. But kernel can't find it :((

Creating 3 MTD partitions on "nand":                                       
                                                                           
                            
0x000000000000-0x000000100000 : "uboot"                                    
                                                                           
                            
0x000000100000-0x000000300000 : "kernel"                                   
                                                                           
                            
0x000000300000-0x000010000000 : "rootfs"                                   
                                                                           
                            
dm9000 Ethernet Driver, V1.31                                              
                                                                           
                            
eth0: dm9000a at c886e000,c8872004 IRQ 108 MAC: 08:90:90:90:90:90 (chip)   
                                                                           
                            
input: gpio-keys as /devices/platform/gpio-keys/input/input0               
                                                                           
                            
samsung-ts s3c64xx-ts: driver attached, registering input device           
                                                                           
                            
input: S3C24XX TouchScreen as /devices/virtual/input/input1                
                                                                           
                            
S3C24XX RTC, (c) 2004,2006 Simtec Electronics                              
                                                                           
                            
s3c-rtc s3c64xx-rtc: rtc disabled, re-enabling                             
                                                                           
                            
s3c-rtc s3c64xx-rtc: rtc core: registered s3c as rtc0                      
                                                                           
                            
TCP cubic registered                                                       
                                                                           
                            
VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5    
                                                                           
                            
s3c-rtc s3c64xx-rtc: setting system clock to 2011-09-05 23:18:04 UTC
(1315264684)                                                               
                                   
yaffs: dev is 32505858 name is "mtdblock2" rw                              
                                                                           
                            
yaffs: passed flags ""                                                     
                                                                           
                            
VFS: Mounted root (yaffs2 filesystem) on device 31:2.                      
                                                                           
                            
devtmpfs: mounted                                                          
                                                                           
                            
Freeing init memory: 96K                                                   
                                                                           
                            
Failed to execute /sbin/init.  Attempting defaults...                      
                                                                           
                            
Kernel panic - not syncing: No init found.  Try passing init= option to
kernel. See Linux Documentation/init.txt for guidance.                     
                                
[<c002ab40>] (unwind_backtrace+0x0/0xe4) from [<c0229258>]
(panic+0x68/0x180)                                                         
                                             
[<c0229258>] (panic+0x68/0x180) from [<c00203a0>] (init_post+0xa0/0xc4)    
                                                                           
                            
[<c00203a0>] (init_post+0xa0/0xc4) from [<c0008958>]
(kernel_init+0x104/0x13c)                                                  
                                                   
[<c0008958>] (kernel_init+0x104/0x13c) from [<c00265b4>]
(kernel_thread_exit+0x0/0x8)

Juergen Beisert
> Failed to execute /sbin/init.  Attempting defaults...

Is your flash filesystem empty?

Ann R. (Russia)
No. it works ok with other kernel

Juergen Beisert
Is your userland OABI or EABI? Maybe the kernel cannot execute OABI code?
(just an idea)

Ann R. (Russia)
>>Is your userland OABI or EABI? 

How can i check it?

Juergen Beisert
"readelf -A <your-arm-root>/bin/<any executable>"

Here from my BSP:

[me@host] readelf -A platform-mini6410/root/usr/bin/qt4-demo
Attribute Section: aeabi <----------- this one
File Attributes
  Tag_CPU_name: "ARM1176JZ-S"
  Tag_CPU_arch: v6KZ
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-1
  Tag_VFP_arch: VFPv2
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  [...]

Or you can run this kernel with "init=/bin/sh" as a try.

The kernel must support the ABI your userland uses.

Juergen Beisert
I just uploaded the YAFFS support into my Mini6410 BSP. Maybe you can test
with the kernel from the current repository

antifish
great work!

will there be USB support soon? I have a CSR bluetooth device which would
be great to have it working!

Juergen Beisert
Sorry, don't know. No time to work on USB support yet.

Juergen Beisert
For the interested: I just made the November release of our free Board
Support Package for the FriendlyARM's Mini6410. Updated features are:

- PTXdist-2011.10.1
  - Qt-4.7.4
- Kernel: 2.6.39, stable release 4
- Kernel 3.0, stable release 8
- Kernel 3.1, (experimental)
- U-Boot, with support to boot from network and SD/MMC card
- Linux based tools to prepare an SD/MMC card to make the Mini6410 boot
  from

Please be a aware: this release still doesn't offer full feature support of
the Mini6410. It still lacks USB and NAND support.

Feature List:
-------------

- PTXdist based buildsystem for easy setup and build
- more than one predefined configuration
  - one without graphic, for 'headless' usage
  - one with full blown Qt support including an example how to use it 
- recent GCC Toolchain (GCC 4.5.2, libc 2.13) for ARM11 with hard floating
  point support
- Bootloader U-Boot-1.1.6
- Kernel: Support for the following list of hardware components
  - serial console
  - SD/MMC card
  - network
  - LED
  - GPIO
  - AD converter
  - I2C master and I2C EEPROM
  - Real time clock
  - Keypad
  - various LC displays (LCD70 and N43)
  - framebuffer
  - touchscreen
- Comprehensive documentation how to prepare and build all software
  components and to deploy the Mini6410.

Additional info can be found here:
http://www.oselas.org/oselas/bsp/pengutronix/index_en.html

Anna R. (Russia)
Sounds good)

But what is the problem with USB and NAND?

Juergen Beisert
Just simple: Lack of time. ;-)

Juergen Beisert
For the interested: I just uploaded the OneWire kernel driver and the
corresponding OnerWire TSLIB extension for the MINI6410 and the Kernel-3.0
to the Mini6410 board support package GIT repository.
Testers are welcome, as I have no OneWire based touchscreen.

Andre Curvello
Juergen Beisert, do you know if the Pengutronix BSP for the Mini6410 has
support to the V4L2 library? I want to use opencv and another web
applications that will need to use the CAM130 or some usb camera.
Thanks.

Juergen Beisert
Support for the libv4lv2 is part of PTXdist, you can enable and test it.
But it is untested in conjunction with the Mini6410. So, its up to you to
make it work, if some special settings are required to get it up and run.
Feel free to ask here or at our Mini6410 mailing list@pengutronix,

Giannis Damigos
Hi Juergen,

I applied the patches for 1wire device from OSELAS BSP for Mini6410 git
repository to my 3.4 kernel but still no output on N43i display.

Could you suggest me what else should I try out?

Kaushik Kale
Can this package be used for Tiny6410 board?

Juergen Beisert
@Giannis Damigos: I only know the N43i from its schematics. So, I cannot
suggest something useful, because I cannot test it

@Kaushik Kale: It also works with the Tiny6410 and its development
baseboard. We recently have tested it at the LinuxTag in Berlin.

Giannis Damigos
@Juergen Could you please try my kernel on your N43 display?

Looking at mach-mini6410.c source code, I think that I should change the
initial value of mini6410 features string.

vib
sudo git clone http://git-public.pengutronix.de/Cloning into
'git-public.pengutronix.de'...
fatal: http://git-public.pengutronix.de/info/refs not found: did you run
git update-server-info on the server?

Has anyone experience this problem and know why?

Juergen Beisert
Try on a per repository base, not the whole server:
git clone
http://git-public.pengutronix.de/git-public/OSELAS.BSP-Pengutronix-Mini6...

vib
Thanks. I've got a clone of the given site.