Fujitsu DTV/STB solution driver (FAPex driver) Documentation [V01L00R00]


Install guide for Linux

Table of Contents

  1. Requirements
  2. Install
  3. Build the driver
  4. Build the abst_lib
  5. Build the application
  6. Build into the root file system
  7. Flash boot
    1. Prepare the environment for writing to Flash.
    2. Flash boot (rootfs:nfs mount)
    3. Boot only of Flash (rootfs:mtd mount)
  8. Executing on the root file system
  9. Debugging with RVDS
  10. Uninstall
Back to top

1. Requirements

1.1. Hardware
     - MB86H61 Development board : 
       MB86H61 FMC PDKV3/4 board : MB86H61-DK
     - Linux PC (OS:FedoraCore 5 or 6, NFS server, Samba server) 
     - User's PC                 : serial console for MB86H61-DK
     - LAN cable                 : connect to J8 for NFS environment
     - serial cable              : connect the attached cable to J28 for User's PC
     - TS input device and connection cable
                                 : connect the TS input device to J13
     - TV and HDMI cable         : connect the HDMI interface of TV to J1
     - RealView ICE              : connect the JTAG cable of ICE to J30 (optional)

1.2. Software
    - Serial Port Terminal software
    - Linux (NFS environment)
    - RealView Debudder (RVDS v3.1)  ... for debugging with ICE (optional)

1.3. Firmware
    use the fapi source package (HDTV_Release_v1.3). This package is in CD-ROM attached
    with MB86H61-DK.
    - Video Decoder firmware
    - Audio Decoder firmware

Back to top

2. Install

2.1. Prepare the kernel source code (kernel tree).
     Please refer readme_en.txt within Linux_for_MB86H6X_V02L01.zip.
     Please confirm the Kernel building procedure with a root filesystem on NFS.

2.2. Expand the FAPex driver to working directory.
     Please properly replace the path name by your environment.
     Here, the FAPex driver is expanded to "/home/user/work" directory for instance.

     note) 
       FAPexK_V01L00R00 folder and FAPI_V01L00R00 folder should be located within same folder.
       (please decompress FAPexK_V01L00R00.tar.bz2 and FAPI_V01L00R00.tar.bz2 on same folder.)

       $ cd /home/user/work
       $ ls 
       FAPI_V01L00R00.tar.bz2  FAPexU_V01L00R00.tar.bz2  FAPexK_V01L00R00.tar.bz2
       $ tar xjf FAPI_V01L00R00.tar.bz2
       $ tar xjf FAPexU_V01L00R00.tar.bz2
       $ tar xjf FAPexK_V01L00R00.tar.bz2

2.3. Provide a link from the kernel tree to FAPI Linux Extension driver's directory
     and FAPI Core driver's directory.
       $ cd ${KERNEL_TOP}/drivers/media
       $ ln -s ${DRV_TOP}/fapex/fapex .
       $ ln -s ${FCORE_TOP} .

     ex.
       ${KERNEL_TOP} : /work/dtv/EmbeddedLinuxKernel-v16.1-mb86hxx
       ${DRV_TOP}    : /home/user/work/FAPexK_V01L00R00/fapex_driver
       ${FCORE_TOP}  : /home/user/work/FAPI_V01L00R00/fapi_driver

2.4. Modify 'Kconfig' & 'Makefile' on ${KERNEL_TOP}/drivers/media by reference to
     'Kconfig' & 'Makefile' on ${DRV_TOP}/fapex.

     --- add the next ahead of 'endmenu' in Kconfig
       config FUJITSU_FAPEX
           tristate "Fujitsu DTV/STB solution"
           default "m"
           help
             Set Y or M if you want to support the Fujitsu DTV/STB device driver (FAPex).

           source "drivers/media/fapex/Kconfig"

       config FUJITSU_FAPI
           tristate "Fujitsu DTV/STB core device driver"
           depends on FUJITSU_FAPEX
           default "m"
           help
             Set Y or M if you want to support the Fujitsu DTV/STB device driver (FAPI).

           source "drivers/media/fapi_driver/Kconfig"
     ----
     --- add the next to end of Makefile
       obj-$(CONFIG_FUJITSU_FAPEX) += fapex/
       obj-$(CONFIG_FUJITSU_FAPI)  += fapi_driver/
     ----

     note) 
       Please modify according to format of Kconfig.
       Failure to comply may result in nondisplay at configuration of "3.2".

2.5. Construct the driver environment (install of driver).
       $ cd ${DRV_TOP}/fapex
       $ ./install_Linux.sh
       $ cd ${FCORE_TOP}
       $ ./install_Linux.sh

     note) 
       At reinstalling, it is necessary to execute ./uninstall_Linux.sh beforehand.

2.6. If there are files in "FAPexK_V01L00R00/tools/Linux/patch",
     modify the Kernel as readme.txt in that folder.

Back to top

3. Build the driver

3.1. Setup environment variables.
       $ UBQDVKBINDIR=/opt/ubq/devkit/arm/arm11
       $ UBQPKGDIR=/opt/ubinux_pkg_tools
       $ ARCH=arm
       $ CROSS_COMPILE=armv6zk-none-linux-gnueabi-
       $ export CROSS_COMPILE ARCH UBQDVKBINDIR UBQPKGDIR
       $ export PATH=$PATH:${UBQDVKBINDIR}/bin:${UBQPKGDIR}/bin

3.2. Setup configuration for FAPI Linux Extension.
       $ cd ${KERNEL_TOP}
       $ make menuconfig

     (setup for memory area)
       setup the Linux kernel controlled area as follows.
     ---- menu config
     System Type  --->
           ARM system type (FUJITSU ARM11 SoC)  --->
       --- FUJITSU ARM11 SoC
           SoC/board type (MB86H61 DEVKIT)  --->
       (0x04000000) Physical Memory Size
       (0x02000000) Memory Size for Video/Audio Firmware
       [*] Large Memory Mapping
        :

     (setup driver)
       setup "loadable-module" drivers as follows.
     ---- menu config
     Device Drivers  --->
       Multimedia devices  --->
        <M> Fujitsu DTV/STB solution
              Fujitsu DTV/STB extension module configuration  --->
                Fujitsu DTV/STB board type configuration  --->
                 board type (Fujitsu MB86H61 Development Kit board)  --->
                Fujitsu DTV/STB system abstraction module configuration  --->
                 <M> FAPI System Abstraction Layer
                Fujitsu DTV/STB extension module functional configuration  --->
                 <M> Core Function Driver of Wrapper for Extension (WFE)
                 <M> Function Driver of WFE : TS Demux
                 [*]   Use the internal Descrambler function
                 <M> Function Driver of WFE : Audio Decoder
                 [ ]   Reboot the Audio firmware
                 <M> Function Driver of WFE : Audio Output
                 <M> Function Driver of WFE : Video Decoder
                 <M> Function Driver of WFE : Video Output
                 [ ]   OSD1/2 fixed mapping
                 <M> Function Driver of WFE : Video Output Encoder
                 <M> Function Driver of WFE : HDMI
                 <M> Function Driver of WFE : HDMI-CEC
                 <M> Function Driver of WFE : Teletext
                 <M> Function Driver of WFE : Front Panel Controler
                 <M> Function Driver of WFE : IR
                 <M> Function Driver of WFE : I2C
                 <M> Function Driver of WFE : ICC
                 <M> Function Driver of WFE : GPIO
                 <M> Function Driver of WFE : CLKPWR
        <M>   Fujitsu DTV/STB core device driver
                Fujitsu DTV/STB core module configuration  --->
                 <M> FAPI Core Driver Layer and FAPI Register Access Layer
                 [ ]   Firmware Booting Method : [*] Embedded Solution / [ ] External Solution
                 [*]   FAPI Register Access Layer is build as inline function.

     note)
       The use of "static-module" on your products is not recommended.

3.3. Build the Kernel.
       $ cd ${KERNEL_TOP}
       $ make

     In this time, the following driver module files are generated.

     (FAPI Sys)
       ${KERNEL_TOP}/drivers/media/fapex/fapicore/sys_drv/fapi_sys.ko
     (Wrapper for Extension (WFE))
       ${KERNEL_TOP}/drivers/media/fapex/wfe/cfdl/fapex_cfdl.ko
       ${KERNEL_TOP}/drivers/media/fapex/wfe/fdlaudec/fapex_fdlaudec.ko
       ${KERNEL_TOP}/drivers/media/fapex/wfe/fdlauout/fapex_fdlauout.ko
       ${KERNEL_TOP}/drivers/media/fapex/wfe/fdlclkpwr/fapex_fdlclkpwr.ko
       ${KERNEL_TOP}/drivers/media/fapex/wfe/fdlfpc/fapex_fdlfpc.ko
       ${KERNEL_TOP}/drivers/media/fapex/wfe/fdlgpio/fapex_fdlgpio.ko
       ${KERNEL_TOP}/drivers/media/fapex/wfe/fdlhdmi/fapex_fdlhdmi.ko
       ${KERNEL_TOP}/drivers/media/fapex/wfe/fdlhdmicec/fapex_fdlhdmicec.ko
       ${KERNEL_TOP}/drivers/media/fapex/wfe/fdli2c/fapex_fdli2c.ko
       ${KERNEL_TOP}/drivers/media/fapex/wfe/fdlicc/fapex_fdlicc.ko
       ${KERNEL_TOP}/drivers/media/fapex/wfe/fdlir/fapex_fdlir.ko
       ${KERNEL_TOP}/drivers/media/fapex/wfe/fdltsd/fapex_fdltsd.ko
       ${KERNEL_TOP}/drivers/media/fapex/wfe/fdlttx/fapex_fdlttx.ko
       ${KERNEL_TOP}/drivers/media/fapex/wfe/fdlvidec/fapex_fdlvidec.ko
       ${KERNEL_TOP}/drivers/media/fapex/wfe/fdlvienc/fapex_fdlvienc.ko
       ${KERNEL_TOP}/drivers/media/fapex/wfe/fdlviout/fapex_fdlviout.ko
     (FAPI Core)
       ${KERNEL_TOP}/drivers/media/fapi_driver/fapicore/core_drv/fapi_core.ko

Back to top

4. Build the abst_lib

4.1. Construct the abstract_lib environment (install of abstract_lib).
       $ cd ${USER_TOP}/abst_lib
       $ ./install_Linux.sh

     ex.
       ${USER_TOP} : /home/user/work/FAPexU_V01L00R00

4.2. Build the driver library on user space.
       $ make

     Therefore, two kinds library (static library 'libfapex_abst.a' and shared library
     'libfapex_abst.so.0.1') are generated.
     Please use it properly according to the application environment.

Back to top

5. Build the application

5.1. Build the library and the application.
       $ cd ${USER_TOP}/sample_application
       $ ./install_Linux.sh
       $ make

Back to top

6. Build into the root file system

     Construct the root file system by method of "making rootfs".
     Please refer readme_en.txt within Linux_for_MB86H6X_V02L01.zip in detail.

6.1. Registration of application
     Make a directory for application in the root file system.
     Copy the executable binary 'fapex_av_demo', 'fapex_fe_demo', 'fapex_osd_demo'
     to that directory.
       $ mkdir ${ROOTFS_TOP}/work
       $ cp ${USER_TOP}/sample_application/fapex_av_demo/fapex_av_demo   ${ROOTFS_TOP}/work
       $ cp ${APP_TOP}/fapex_fe_demo/fapex_av_demo   ${ROOTFS_TOP}/work
       $ cp ${USER_TOP}/sample_application/fapex_osd_demo/fapex_osd_demo ${ROOTFS_TOP}/work

      (${ROOTFS_TOP} is /opt/ubq/devkit/arm/arm11/target)

6.2. Registration of library
     If the application refer shard library, it is necessary to copy following libraries to
     the root file system.
       - libfapex_abst.so.0.1
       - libdraw.so.0.1
       - libfbf.so.0.1
       - libfontserver.so.0.1
       - libfontserver_engine_fbf.so.0.1
       - libfontserver_engine_ft.so.0.1
       - libfreetype2.so.0.1
       - libftf.so.0.1
       - libosdhandler.so.0.1
       - libval.so.0.1
       - libvcl.so.0.1
     You can copy by using following script.
       $ cd ${USER_TOP}/sample_application
       $ su
       # ./install_SharedLibs.sh ${ROOTFS_TOP}/usr/local/lib
       # exit

6.3. Registration of driver module
     Copy driver module files(*.ko) to the application directory by using following
     make command.
       $ cd ${KERNEL_TOP}
       $ su
       # make INSTALL_MOD_PATH=${ROOTFS_TOP} modules_install
       # exit

6.4. Registration of script files
     For setup driver environment after start-up the root file system,
     copy the script files as follows.
       $ cp ${DRV_TOP}/makenodall.sh ${ROOTFS_TOP}/work
       $ cp ${DRV_TOP}/rmnodall.sh   ${ROOTFS_TOP}/work
       $ cp ${DRV_TOP}/insmodall.sh  ${ROOTFS_TOP}/work
       $ cp ${DRV_TOP}/rmmodall.sh   ${ROOTFS_TOP}/work

Back to top

7. Flash boot

     This documentation describes External type of 2nd level 'booter' booting as one
     example of Booting methods.
     As the setup procedure about other booting method, please refer "Booting Methods"
     section.

7.1. Prepare the environment for writing to Flash.

     Copy the whole 'FAPexK_V01L00R00/tools/Linux/FlashBoot/BurnFlash4Linux/' folder
     to '${FAPI_TREE_TOP}\applications' in RTOS environment.

     ex. the FAPI top directory (RTOS environment)
       ${FAPI_TREE_TOP} : D:\work\HDTV_Release_v1.4

     Copy 'FAPexK_V01L00R00/tools/Linux/FlashBoot/ddr_init_linux.rvs' to
     "${FAPI_TREE_TOP}\env\execute" directory.

7.2. Boot only of Flash (rootfs:nfs mount)

7.2.1. Prepare the file for writing to Flash.
     Copy the Kernel image file "${KERNEL_TOP}/arch/arm/boot/Image" generated by building
     the Linux Kernel to "${FAPI_TREE_TOP}\applications\BurnFlash4Linux".

     However, if you use the "${KERNEL_TOP}/arch/arm/boot/zImage", you should change the value of
     zreladdr-y to 0x22008000 (0x20008000 + {value of "Memory Size for Video/Audio Firmware" at "make menuconfig"})
     in "${KERNEL_TOP}/arch/arm/mach-mb86hxx/Makefile.boot", and you should build the kernel again.

7.2.2. Write to Flash.
     Connect the 'SmartMPEG-DEBUG-USB' adapter cable for loading data to the MB86H61
     Development board.

     Check your board to make sure the PFlash or SFlash memory is used for boot on your board.
     If it is PFlash, rename the file "fastboot-pflash.bin" to "fastboot.bin" 
     and change the below line in "${FAPI_TREE_TOP}\Config.mak" file.
          FLASHTYPE            ?= 16bit@32 

     If it is SFlash, rename the file "fastboot-sflash.bin" to "fastboot.bin" 
     and change the below line in "${FAPI_TREE_TOP}\Config.mak" file.
          FLASHTYPE            ?= 32bit@32 

     Execute the next command for writing to Flash.
       > cd ${FAPI_TREE_TOP}\applications\BurnFlash4Linux
       > BurnFlash4Linux.bat

7.2.3. Flash boot.
     Reset the Development board after completion of writing to Flash.
     The Linux Kernel will start.

7.3. Boot only of Flash (rootfs:mtd mount)

     It is a sample procedure to make the following compositions for the Flash memory,
     and to make it boot only with a root filesystem on the Flash memory.
                -------+-------------------+
                   |   |                   | Kernel + Firm : ddr_init + kernel
                   |   |  Kernel + Firm    |                 + videoDec firmware
                   |   |  (4MB)            |                 + audioDec firmware
      + 0x00400000 V   |                   |
                -------+-------------------+
                   |   |                   |
                   |   |  MTD Partition    |
                   |   |  (12MB)           |
                   |   |                   |
                   |   |  (for rootfs)     |
                   |   |                   |
                   |   |                   |
                   |   |                   |
                   |   |                   |
                   |   |                   |
                   |   |                   |
                   |   |                   |
      + 0x00c00000 V   |                   |
                 ------+-------------------+

7.3.1. Construct the kernel (+ root file system NFS) for the MTD partition operation.
       $ cd ${KERNEL_TOP}
       $ make menuconfig

     Add the MTD driver to the Linux kernel.
     Please add the MTD driver referring to the Linux install manuals.

     - Enable the MTD driver.
       ---- menu config
       Device Drivers --->
         Memory Technology Devices(MTD)--->
          <*> Memory Technology Device (MTD) support
          [ ]   Debugging
          < >   MTD concatenating support
          [*]   MTD partitioning support
          < >     RedBoot partition table parsing
          [*]     Command line partition table parsing
          < >     ARM Firmware Suite partition parsing
          ---   User Modules And Translation Layers
          <*>   Direct char device access to MTD devices
          ---   Common interface to block layer for MTD 'translation layers
          <*>   Caching block device access to MTD devices
          < >   FTL (Flash Translation Layer) support
          < >   NFTL (NAND Flash Translation Layer) support
          < >   INFTL (Inverse NAND Flash Translation Layer) support
          < >   Resident Flash Disk (Flash Translation Layer) support
          < >   NAND SSFDC (SmartMedia) read only translation layer

     - Select the Flash chip type.
       ---- menu config
       Device Drivers --->
         Memory Technology Devices(MTD) --->
           RAM/ROM/Flash chip drivers --->
            <*> Detect flash chips by Common Flash Interface (CFI) probe
            < > Detect non-CFI AMD/JEDEC-compatible flash chips
            [ ] Flash chip driver advanced configuration options
            < > Support for Intel/Sharp flash chips
            <*> Support for AMD/Fujitsu flash chips
            < > Support for ST (Advanced Architecture) flash chips
            < > Support for RAM chips in bus mapping
            < > Support for ROM chips in bus mapping
            < > Support for absent chips in bus mapping
            [ ] Older (theoretically obsoleted now) drivers for non-CFI chips

     - Set the MTD partition of Flash.
       Offset:0x00400000 Size:0x00c00000(12Mbyte)
       ---- menu config
       Device Drivers--->
         Memory Technology Devices(MTD) --->
           Mapping drivers for chip access --->
            [ ] Support non-linear mappings of flash chips
            < > CFI Flash device in physical memory map
            < > CFI Flash device mapped on ARM Integrator/P720T
            < > Map driver for platform device RAM (mtd-ram)
            <*> MB86HXX Parallel Flash
            [ ]   UPI Init
            (0x00400000) Offset Address
            (0x00c00000) Size

     - Set the filesystem.
       ---- menu config
       File systems --->
         Miscellaneous filesystems --->
          ...
          <*> Journalling Flash File System v2 (JFFS2) support
          (0)   JFFS2 debugging verbosity (0 = quiet, 2 = noisy)
          [*]   JFFS2 write-buffering support
          [ ]   JFFS2 summary support (EXPERIMENTAL)
          [ ]   JFFS2 XATTR support (EXPERIMENTAL)
          [ ]   Advanced compression options for JFFS2
          <*> Compressed ROM file system support (cramfs)
          ...

     - Confirm the Preemptible setting.
       The FAPex driver doesn't guarantee the Flash memory access with application
       at the same time.
       Therefore, it is necessary to invalidate the Preemptible Kernel.
       ---- menu config
       Kernel Features  --->
         [ ] Preemptible Kernel (EXPERIMENTAL)

     Confirm the above setting and build the Kernel image.
       $ make

7.3.2. Write to Flash (1).
     Copy the made Kernel image (${KERNEL_TOP}/arch/arm/boot/Image) to
     ${FAPI_TREE_TOP}\applications\BurnFlash4Linux folder.

     Copy 'FAPexK_V01L00R00/tools/Linux/FlashBoot/ddr_init_linux.rvs' to
     "${FAPI_TREE_TOP}\env\execute" directory.

     Connect the 'SmartMPEG-DEBUG-USB' adapter cable for loading data to the MB86H61
     Development board.
     Execute the next command for writing the kernel (+ root file system NFS) to Flash.
       > cd ${FAPI_TREE_TOP}\applications\BurnFlash4Linux
       > BurnFlash4Linux.bat

7.3.3. Make the MTD device file.
     Make the MTD device file by following commands.
       $ cd ${ROOT_FS}/dev
       $ su
       # mknod ./mtdblock0 b 31 0
       # mknod ./mtd0 c 90 0
       # ls -l mtd*
       crw-r--r-- 1 root root 90, 0 Dec 16 11:00 mtd0
       brw-r--r-- 1 root root 31, 0 Dec 16 11:00 mtdblock0

7.3.4. Making of kernel for boot only with Flash memory.
       $ cd ${KERNEL_TOP}
       $ make menuconfig

     - Set the MTD partition to the root file system selection of the start command line.
       ---- menu config
       Boot options  --->
         console=ttyAMA0,115200 root=/dev/mtdblock0 rw rootfstype=jffs2

     - Set NFS invalidly.
       ---- menu config
       File systems  --->
         Network File Systems  --->
          < > NFS file system support

     - Add the MTD driver, and set the MTD partition.
       The setting of "7.3.1." is used as it is.

     Confirm the above setting and build the Kernel image.
       $ make

     Copy the Kernel image file (${KERNEL_TOP}/arch/arm/boot/Image) to
     "${FAPI_TREE_TOP}\applications\BurnFlash4Linux" directory.

7.3.5. Make the rootfs image for the boot only with Flash memory.
     - Collect files for making the image of rootfs.
       $ cd ${KERNEL_TOP}
       $ cp /opt/ubinux_pkg_tools/share/tools/sample-config/ubinux_make_rootfs.dev.conf ./
       $ su
       # /opt/ubinux_pkg_tools/bin/ubinux_make_rootfs -f ${ROOTFS_TOP}/ \
         -r ${ROOTFS_TOP}/opt/ubq/devkit/arm/arm11/trpmdb/ \
         -k ${KERNEL_TOP}/ -t ./minimum-rootfs/

      ------ ubinux_make_rootfs
         [Command menu]
            (Select only following Command.)
            [*] /bin/bash - bash
            [*] /bin/busybox - busybox
            [*] /sbin/mingetty - mingetty
            [*] /work/fapex_av_demo - (no package)
            Press the "n" (next) key after selecting these.

         [Other file menu]
            (Select only the following.)
            [*] /dev/fapi/fapi000
            [*] /dev/fapi/fapi001
            [*] /dev/fapi/fapi002
                ....
            [*] /dev/fapi/fapi255
            [*] /dev/mtd0
            [*] /lib/modules/2.6.31.6/fapex_cfdl.ko
            [*] /lib/modules/2.6.31.6/fapex_fdlaudec.ko
            [*] /lib/modules/2.6.31.6/fapex_fdlauout.ko
            [*] /lib/modules/2.6.31.6/fapex_fdlclkpwr.ko
            [*] /lib/modules/2.6.31.6/fapex_fdlfpc.ko
            [*] /lib/modules/2.6.31.6/fapex_fdlgpio.ko
            [*] /lib/modules/2.6.31.6/fapex_fdlhdmi.ko
            [*] /lib/modules/2.6.31.6/fapex_fdlhdmicec.ko
            [*] /lib/modules/2.6.31.6/fapex_fdli2c.ko
            [*] /lib/modules/2.6.31.6/fapex_fdlicc.ko
            [*] /lib/modules/2.6.31.6/fapex_fdlir.ko
            [*] /lib/modules/2.6.31.6/fapex_fdltsd.ko
            [*] /lib/modules/2.6.31.6/fapex_fdlttx.ko
            [*] /lib/modules/2.6.31.6/fapex_fdlvidec.ko
            [*] /lib/modules/2.6.31.6/fapex_fdlvienc.ko
            [*] /lib/modules/2.6.31.6/fapex_fdlviout.ko
            [*] /lib/modules/2.6.31.6/fapi_core.ko
            [*] /lib/modules/2.6.31.6/fapi_sys.ko
            [*] /proc/mounts
            [*] /var/log/wtmp
            [*] /work/insmodall.sh
            [*] /work/makenodall.sh
            [*] /work/rmmodall.sh
            [*] /work/rmnodall.sh
            Press the "n" (next) key after selecting these.

         [Manual/License menu]
            Press the "n" (next) key without selecting anything.

         [Ready ? menu]
            Press the "s" (start) key.

       Making the root filesystem start.
       xxxxx blocks
       Making the root filesystem succeeded.
       RootFS Maker finish.
       #

     Rootfs is made in "${KERNEL_TOP}/minimum-rootfs/root" by the selected composition.

     - Obtain 'mkfs.jffs2'. (Refer to the Linux installation manual for the obtaining method.)
       (When ubinux_make_fsimage is executed, 'mkfs.jffs2' is necessary.)
       # cp mkfs.jffs2 /sbin/

     - Make the rootfs image file.
       # cd ${KERNEL_TOP}
       # /opt/ubinux_pkg_tools/bin/ubinux_make_fsimage -f ./minimum-rootfs/root/ -t ./jffs2-image

         [Image type menu]
            "JFFS2"
            is selected and press the ENTER key.

         [JFFS2 Parameter menu]
            Image size       : 6M__________bytes
            Page size        : 4K__________bytes
            Erase block size : 0x20000_____bytes
            Endian           : (*) Little endian ( ) Big endian
            Press the "OK".

         [Ready ? confirmation menu]
            Press the "OK".

       Making the JFFS2 image start.
       Making the JFFS2 image succeeded.
       RootFS Image Maker finish.
       #

     The image of rootfs (for MTD) is made in "${KERNEL_TOP}/jffs2-image/"
     by the file name of 'rootfs.jffs2.yyyymmdd-hhmmss.bin'.

     - Prepare the rootfs image file.
       Copy 'rootfs.jffs2.yyyymmdd-hhmmss.bin' to rootfs (for NFS mount) directory.
       $ cp ${KERNEL_TOP}/jffs2-image/rootfs.jffs2.yyyymmdd-hhmmss.bin ${ROOTFS_TOP}/work

7.3.6. Make rootfs for the MTD partition.
     - Start-up with the Kernel + rootfs(NFS) made at "7.3.1.".
       And login by root on the console.

     - Confirm the MTD partition.
       Please confirm as follows.
       # dmesg
       ...
       Creating 1 MTD partitions on "mb86hxx-pflash.0":
       0x00400000-0x01000000 : "rootfs"
       ...
       # cat /proc/mtd
       dev:    size   erasesize  name
       mtd0: 00c00000 00020000 "rootfs"

     - Format the memory by the jffs2 form.
       # flash_eraseall -j /dev/mtd0

     - Write the rootfs image.
       # dd if=/work/rootfs.jffs2.yyyymmdd-hhmmss.bin of=/dev/mtdblock0 bs=131072

     - Confirm the writing result
       # mkdir /mnt/mtd
       # mount -t jffs2 /dev/mtdblock0 /mnt/mtd
       # ls /mnt/mtd
       bin      etc      linuxrc  opt      sbin     sys      var
       boot     home     media    proc     selinux  tmp      work
       dev      lib      mnt      root     srv      usr
       #

     Shut down Kernel+rootfs(NFS) because making rootfs in MTD partition was completed.

7.3.7. Write to Flash (2).
     Connect the 'SmartMPEG-DEBUG-USB' adapter cable for loading data to the MB86H61
     Development board.
     Execute the next command for writing Image file made at "7.3.4." to Flash.
       > cd ${FAPI_TREE_TOP}\applications\BurnFlash4Linux
       > BurnFlash4Linux.bat

7.3.8. Flash boot.
     Reset the Development board after completion of writing to Flash.
     The Linux Kernel will start.

Back to top

8. Executing on the root file system

8.1. Register the device file.
     Login after the Kernel boot, move to the prepared application directory.
     Register the device file(fapi/fapi***) to "/dev" directory by following script.
       # cd /work
       # ./makenodall.sh

     note)
       After registration of device file, this registrated information will be saved until
       unregistration.

8.2. Configuration setting for 'root' user
     Set the configuration to refer the shared libraries of ${ROOTFS_TOP}/usr/local/lib
     directory.

     note)
       This registered configuration will be saved until unregistration.

8.2.1. Using the "bash"
     Edit the "/etc/passwd" file as follows.

     (before)
       root::0:0:root:/root:/bin/csh

     (after)
       root::0:0:root:/root:/bin/bash

8.2.2. Make the .bashrc file and the .bash_profile file
     Make the .bashrc file in "/root" folder, and register as following content.

       export LD_LIBRARY_PATH=/usr/local/lib

     Make the .bash_profile file in "/root" folder, and register as following content.

       if [ -f ~/.bashrc ]; then
           . ~/.bashrc
       fi

8.3. Register the driver.
     In using loadable-module, register the driver by following script.
       # ./insmodall.sh

8.4. Execute the application
     Please refer "Application" section for each application in detail.

 (1) AV demo
     Playback stream from TS input device.
       # ./fapex_av_demo

     It scan the input stream, display service list, and playback No.0 stream of service list.
     The service number might be changed with "up" or "down" command.
     It ends by "exit" command.

 (2) OSD demo
     Display the bitmap file of data folder continuously.
       # ./fapex_osd_demo

     In executing 'fapex_osd_demo', copy the '${USER_TOP}/sample_application/fapex_osd_demo/data'
     folder to the root file system.

8.5. Unregister the driver.
     In using lodable-module driver, you may unregister the driver by following script.
       # ./rmmodall.sh

8.6. Unregister the device file.
     You may unregister the device file by following script.
       # ./rmnodall.sh

Back to top

9. Debugging with RVDS

9.1. Setup the Flash memory
     When boot type is External, it is necessary to write the Video Decoder firmware in the
     Flash memory beforehand.
     (Under the environment of RTOS. The firmware is written by way of ARC Debug Port.)

     - Obtain source environment(HDTV_Release_v1.5) of FAPI and expand this.
       It is described below ... &{FAPI_TREE_TOP} : top directory of FAPI

     - Create an environment, and build.
       execute ShellCmd.bat and make on Windows.
       > cd ${FAPI_TREE_TOP}
       > ShellCmd.bat
       > make

     - Connect MB86H61-DEBUG-JTAG to J27 and J30 of MB86H61-DK board under power-off mode.
     - Power-on MB86H61-DK board.
     - Prepare to write Video decoder firmware to the Flash memory.
       Confirm ${FAPI_TREE_TOP}\applications\av_demo\Makefile as follows.
         VIDEO_FIRMWARE_USE_EMBEDDED = 0
         AUDIO_FIRMWARE_USE_EMBEDDED = 0
         AUDIO_FIRMWARE_USE_FLASHMEM = 0
         FLASH_INCLUDE_APPLICATION = 0

     - Write Video decoder firmware to the Flash memory.
       > cd ${FAPI_TREE_TOP}\applications\av_demo
       > make flash

     When boot type is Embedded, it is not necessary to write the Video Decoder firmware in
     the Flash memory beforehand. Please erase Flash memory with following commands.
       > cd ${FAPI_TREE_TOP}
       > ShellCmd.bat
       > cd ${FAPI_TREE_TOP}\applications\av_demo
       > make flash-erase

9.2. Boot the Kernel
     Execute the script 'FAPexK_V01L00R00/tools/Linux/RealViewICE/mb86h61_init.inc' on the RVDS.
     Boot the Kernel and the root file system.

     Please refer readme_en.txt within Linux_for_MB86H6X_V02L01.zip about setup of RVDS.

     note)
       When this script file is executed, ${KERNEL_TOP}/arch/arm/boot/Image and
       ${KERNEL_TOP}/vmlinux are loaded.
       So, please adjust the file path described in script file to these.

       When boot type is External, Audio Decoder firmware is loaded at executing script.
       Therefore, prepare the binary file for Audio Decoder firmware(audio_decoder.bin).

       For reference, Audio Decoder firmware is in the following folder.
         FAPI_V01L00R00/fapi_driver/fapicore/firmware/audio

       When boot type is Embedded, please disable Audio Decoder firmware loading of script.

Back to top

10. Uninstall

10.1. Delete the driver files.
     Delete the object and the driver file by following procedure.
       $ cd ${KERNEL_TOP}
       $ make clean

10.2. Uninstall the driver environment.
     Delete the symbolic link by following procedure.
       $ cd ${DRV_TOP}/fapex
       $ ./uninstall_Linux.sh
       $ cd ${FCORE_TOP}
       $ ./uninstall_Linux.sh

10.3. Uninstall the abst_lib environment.
     Delete the symbolic link by following procedure.
       $ cd ${DRV_TOP}/abst_lib
       $ ./uninstall_Linux.sh

Back to top

Copyrights

     ARM is the registered trademark of ARM Limited.
     ARM1176JZF-S is the trademark of ARM Limited.
     RealView ICE, RealView Development Suite and RealView Debugger are the products of
     ARM Limited.
     Linux is a trademark or registered trademark of Linus Torvalds in the United States
     and other countries.
     All system names and product names are generally trademarks or registered trademarks
     of their respective companies.
     This guide does not always provide the (TM) or (R) marks.

Back to top

change log

 2010/04/xx  - change registration method for driver modules in "6.3. Registration of
               driver module".
 2010/04/10  - Add 'fapex_fe_demo' in "6.1. Registration of application"
             - Add sflash support in "7.2.2. Write to Flash".
 2010/03/31  - change the registered directory for libraries from "${ROOTFS_TOP}/usr/lib" to
               "${ROOTFS_TOP}/usr/local/lib".
             - add the instructions for use the kernel image file "zImage".
             - change the procedure for the burning Flash to the batch command.
             - add the "8.2. Configuration setting for 'root' user".
 2009/10/30  - add "1. Requirements"
             - represent the process of building rootfs to "6. Build into the root file system".
             - modify the registration process of shared libraries to automated script in
               "6.2. Registration of library".
             - represent the process after booting to "8. Executing on the root file system."
             - represent the booting with ICE to "9. Debugging with RVDS"
 2009/08/12  - change the kernel modification to patch type.
             - update the contents of "make menuconfig".
             - added the note for "make flash".
             - change the directory registering *.ko files.
             - specify that this documentation describes External type of ROM loader
               booting as one example of Booting methods.
 2009/04/24  - integrate the construction procedures of FAPI Core driver.
             - modify the shared libraries used by sample applications.
             - modify the location of Audio Decoder firmware.
 2009/03/02  - modify the MEM Size to (0x02000000) in (setup for memory area) of
               "2.2. Setup configuration for FAPI Linux Extension."
             - add the libraries of '${APP_TOP}/fapex_subsystems' as shared library
               in section 4 and 5.
 2008/12/19  - add the boot-up method with a root filesystem on MTD.
 2008/11/10  - add the explanation about FAPI core driver module.
             - add Teletext, HDMI-CEC, I2C, GPIO, and CLKPWR driver to generated
               module.
             - modify the minor version of driver library.
             - modify the flash writing command.
 2008/10/08  - add the explanation of the firmware to "5.1. Booting the Kernel."
 2008/08/29  - add "6. Flash boot"
 2008/03/19  - modification
 2008/03/14  - modify to the environment and procedure at 2008/03/14.
 2008/01/21  - first version

Back to top


Copyright © 2006-2010 by Fujitsu Semiconductor Europe GmbH
Copyright © 2008-2010 by Fujitsu Semiconductor Limited

Disclaimer:
Please note that the use of this has been based on the terms and conditions of "DK Consent Letter (For Linux)" agreement between you and Fujitsu Semiconductor Limited.
The contents of this document may be revised without prior notice. Contact our sales department for confirmation. The information in this document are presented as is, no license is granted by implication or otherwise.
More...

FUJITSU sales representatives