Linux & Open Source related information for AT91 Smart ARM Microcontrollers

View   r8  >  r7  >  r6  >  r5  >  r4  ...

OpenEmbeddedAngstromUse 8 - 15 Apr 2008 - Main.NicolasFerre
Line: 1 to 1
 
META TOPICPARENT name="OpenEmbeddedAngstrom"

OpenEmbedded / Angstrom : use the demo root filesystem

Line: 98 to 98
 
Changed:
<
<
META FILEATTACHMENT attachment="angstrom-x11-image-demo.bb" attr="" comment="linux4sam_1.0_20071003" date="1193213335" name="angstrom-x11-image-demo.bb" path="angstrom-x11-image-demo.bb" size="714" stream="angstrom-x11-image-demo.bb" user="Main.NicolasFerre" version="1"
>
>
META FILEATTACHMENT attachment="angstrom-x11-image-demo.bb" attr="" comment="linux4sam_1.2_20080415" date="1208264960" name="angstrom-x11-image-demo.bb" path="angstrom-x11-image-demo.bb" size="739" stream="angstrom-x11-image-demo.bb" user="Main.NicolasFerre" version="2"
 
META TOPICMOVED by="NicolasFerre" date="1189505684" from="Linux4SAM.OpenEmbeddAngstromUse" to="Linux4SAM.OpenEmbeddedAngstromUse"

OpenEmbeddedAngstromUse 7 - 24 Oct 2007 - Main.NicolasFerre
Line: 1 to 1
 
META TOPICPARENT name="OpenEmbeddedAngstrom"

OpenEmbedded / Angstrom : use the demo root filesystem

Line: 98 to 98
 
Added:
>
>
META FILEATTACHMENT attachment="angstrom-x11-image-demo.bb" attr="" comment="linux4sam_1.0_20071003" date="1193213335" name="angstrom-x11-image-demo.bb" path="angstrom-x11-image-demo.bb" size="714" stream="angstrom-x11-image-demo.bb" user="Main.NicolasFerre" version="1"
 
META TOPICMOVED by="NicolasFerre" date="1189505684" from="Linux4SAM.OpenEmbeddAngstromUse" to="Linux4SAM.OpenEmbeddedAngstromUse"

OpenEmbeddedAngstromUse 6 - 12 Oct 2007 - Main.NicolasFerre
Line: 1 to 1
 
META TOPICPARENT name="OpenEmbeddedAngstrom"

OpenEmbedded / Angstrom : use the demo root filesystem

Line: 60 to 60
 Angstrom feeds are discussed in the Angstrom Wiki.
Changed:
<
<
Informations on packages are stored on particular files : the Packages or Packages.gz files. You can create a feed on you own, building such a file to describe packages content, dependencies and management informations. This file is downloaded to the target while issuing the ipkg update command.
>
>
Information on packages are stored on particular files : the Packages or Packages.gz files. You can create a feed on you own, building such a file to describe package content, dependencies and management information. This file is downloaded to the target while issuing the ipkg update command.
 You can create a custom ipkg feed using the ipkg-make-index compiled and installed in the staging directory created during the OpenEmbedded/Angstrom build process.

OpenEmbeddedAngstromUse 5 - 11 Oct 2007 - Main.NicolasFerre
Line: 1 to 1
 
META TOPICPARENT name="OpenEmbeddedAngstrom"
Deleted:
<
<
 

OpenEmbedded / Angstrom : use the demo root filesystem

Boot to the installed rootfs


OpenEmbeddedAngstromUse 4 - 26 Sep 2007 - Main.RfoLnx4sam
Line: 1 to 1
 
META TOPICPARENT name="OpenEmbeddedAngstrom"

OpenEmbedded / Angstrom : use the demo root filesystem

Line: 57 to 57
 Here is a detailed page about the ipkg system.
Changed:
<
<
/etc/ipkg.conf, /etc/ipkg/*.conf files points towards the servers where the device can pull packages from.
>
>
On the target, /etc/ipkg.conf, /etc/ipkg/*.conf files points towards the servers where the device can pull packages from.
 Angstrom feeds are discussed in the Angstrom Wiki.

OpenEmbeddedAngstromUse 3 - 11 Sep 2007 - Main.NicolasFerre
Line: 1 to 1
 
META TOPICPARENT name="OpenEmbeddedAngstrom"

OpenEmbedded / Angstrom : use the demo root filesystem

Deleted:
<
<

Install a rootfs on an AT91 board

This section describes How to load a jffs2 root filesystem into the NAND FLASH of the board with SAM-BA and right through the u-boot command line. SAM-BA is the simplest way.

hand Note that the root file system is installed at offset 0x0 in the NAND FLASH. From a Linux kernel point of view, this corresponds to the index 0 of the MTD subsystem device (/dev/mtd0 and /dev/mtdblock0).

warning Note also that this operation will need a complete erase of the board NAND FLASH. Be sure not to lost data during this operation.

Using SAM-BA

  • Make sure that the chip can execute the bootROM monitor SAM-BA-boot.
    Indeed, the chip must not find an executable code on any boot media, otherwise it will execute it instead of giving access to SAM-BA.
    TODO link to AT91Bootstrap for explaining how (or the boot_strategies document from FredOBoYeR? )
  • Reset the board
  • Connect the USB Device Interface to your host machine using the USB Device Cable
  • Start SAM-BA GUI Application
  • Select the the board in the drop-down menu and choose the USB Connection

    SAM-BA_selectboard.jpg

  • Eventually plug back a jumper to access the media on which u-boot must be loaded to
  • In the main SAM-BA window :
SAM-BA_mainwin-rootfs.png
  1. Choose the NandFlash media tab in the SAM-BA GUI interface
  2. Initialize the media choosing the NandFlash Init action in the Scripts rolling menu and press Execute
  3. In the same Scripts menu choose the NandFlash Erase All action and press Execute . A Please Wait... dialog window is appearing: wait for the end of the erase process
  4. Press on Send File Name Browse button
  5. Choose the filesystem image file ( x11-image-demo-at91sam9263ek.jffs2 for example) and press Open
  6. Enter the proper address in NAND FLASH in the Address text field. You can find a media map for each product in AT91Bootstrap TODO find chapter in page AT91Bootstrap
  7. Press Send File button. A Please Wait... dialog window is appearing: wait for the end of the flashing process
  8. Close SAM-BA, remove the USB cable

Ok, now you must have a the Linux root filesystem flashed on your board.

Using u-boot commands

Here is a reference documentation about JFFS2 as root filesystem on the u-boot documentation website.

Following commands documentation is available in the u-boot doc/README.nand documentation file.

    1. erase the whole NAND FLASH

U-Boot> nand erase

NAND erase: device 0 whole chip
Skipping bad block at  0x000c0000
Skipping bad block at  0x009c0000
Erasing at 0xffe0000 -- 100% complete.
OK

    2. download the JFFS2 filesystem from TFTP to the board RAM (address 0x21400000)

U-Boot> tftp 0x21400000 x11-image-demo-at91sam9263ek.jffs2
TFTP from server 10.159.240.137; our IP address is 10.159.245.170
Filename 'nferre/x11-image-demo-at91sam9263ek.jffs2'.
Load address: 0x21400000
Loading: T #################################################################
         #######################################################T ##########
         #################################################################
         [..]
        #########################
done
Bytes transferred = 26083328 (18e0000 hex)
    pencil remember the number of Bytes transferred just indicated above. It will be useful for the nand write.jffs2 command.

    3. write the filesystem from RAM@0x21400000 to NAND FLASH at offset 0x0 (Linux /dev/mtdblock0). Note the last parameter : it is the number of Bytes transferred indicated in the previous command.

U-Boot> nand write.jffs2 0x21400000 0x0 0x18e0000

NAND write: device 0 offset 0, size 26083328 ...
Bad block at 0xc0000 in erase block from 0xc0000 will be skipped
Bad block at 0x9c0000 in erase block from 0x9c0000 will be skipped
Writing data at 0x195f800 -- 100% complete.
OK

hand Note that bad blocks just shown above are normal behavior of a NAND FLASH : they are skipped and the filesystem will not mind, it is designed to manage them.

Good, now you have a fresh JFFS2 filesystem you can boot on.

 

Boot to the installed rootfs

Check Load Linux with u-boot chapter in the u-boot page to know how to load a Linux kernel.

Once loaded, the Linux kernel tries to mount a root file system ; command line parameters can indicate a location of such a rootfs. This option can be specified during the build process of through a u-boot environment variable.

Changed:
<
<
Here is a sample command line for booting at the beginning of the NAND FLASH : address 0x0 indicated in the proper Address text field during the flashing process (step #6).
>
>
Here is a sample command line for booting at the beginning of the NAND FLASH : address 0x0 indicated in the proper Address text field during the flashing process (step #6).
 
mem=64M console=ttyS0,115200 root=/dev/mtdblock0 rw rootfstype=jffs2
Line: 178 to 99
 
Deleted:
<
<
META FILEATTACHMENT attachment="SAM-BA_mainwin-rootfs.png" attr="" comment="SAM-BA main window flashing rootfs" date="1189510627" name="SAM-BA_mainwin-rootfs.png" path="SAM-BA_mainwin-rootfs.png" size="31320" stream="SAM-BA_mainwin-rootfs.png" user="Main.NicolasFerre" version="1"
 
META TOPICMOVED by="NicolasFerre" date="1189505684" from="Linux4SAM.OpenEmbeddAngstromUse" to="Linux4SAM.OpenEmbeddedAngstromUse"

OpenEmbeddedAngstromUse 2 - 11 Sep 2007 - Main.NicolasFerre
Line: 1 to 1
 
META TOPICPARENT name="OpenEmbeddedAngstrom"

OpenEmbedded / Angstrom : use the demo root filesystem

Line: 22 to 22
 

SAM-BA_selectboard.jpg

  • Eventually plug back a jumper to access the media on which u-boot must be loaded to
  • In the main SAM-BA window :
Changed:
<
<
SAM-BA_mainwin-rootfs.jpg
>
>
SAM-BA_mainwin-rootfs.png
 
  1. Choose the NandFlash media tab in the SAM-BA GUI interface
  2. Initialize the media choosing the NandFlash Init action in the Scripts rolling menu and press Execute
  3. In the same Scripts menu choose the NandFlash Erase All action and press Execute . A Please Wait... dialog window is appearing: wait for the end of the erase process
Line: 176 to 176
 
  • usb key
  • SD/MMC card
Added:
>
>

META FILEATTACHMENT attachment="SAM-BA_mainwin-rootfs.png" attr="" comment="SAM-BA main window flashing rootfs" date="1189510627" name="SAM-BA_mainwin-rootfs.png" path="SAM-BA_mainwin-rootfs.png" size="31320" stream="SAM-BA_mainwin-rootfs.png" user="Main.NicolasFerre" version="1"
 
META TOPICMOVED by="NicolasFerre" date="1189505684" from="Linux4SAM.OpenEmbeddAngstromUse" to="Linux4SAM.OpenEmbeddedAngstromUse"

OpenEmbeddedAngstromUse 1 - 11 Sep 2007 - Main.NicolasFerre
Line: 1 to 1
Added:
>
>
META TOPICPARENT name="OpenEmbeddedAngstrom"

OpenEmbedded / Angstrom : use the demo root filesystem

Install a rootfs on an AT91 board

This section describes How to load a jffs2 root filesystem into the NAND FLASH of the board with SAM-BA and right through the u-boot command line. SAM-BA is the simplest way.

hand Note that the root file system is installed at offset 0x0 in the NAND FLASH. From a Linux kernel point of view, this corresponds to the index 0 of the MTD subsystem device (/dev/mtd0 and /dev/mtdblock0).

warning Note also that this operation will need a complete erase of the board NAND FLASH. Be sure not to lost data during this operation.

Using SAM-BA

  • Make sure that the chip can execute the bootROM monitor SAM-BA-boot.
    Indeed, the chip must not find an executable code on any boot media, otherwise it will execute it instead of giving access to SAM-BA.
    TODO link to AT91Bootstrap for explaining how (or the boot_strategies document from FredOBoYeR? )
  • Reset the board
  • Connect the USB Device Interface to your host machine using the USB Device Cable
  • Start SAM-BA GUI Application
  • Select the the board in the drop-down menu and choose the USB Connection

    SAM-BA_selectboard.jpg

  • Eventually plug back a jumper to access the media on which u-boot must be loaded to
  • In the main SAM-BA window :
SAM-BA_mainwin-rootfs.jpg
  1. Choose the NandFlash media tab in the SAM-BA GUI interface
  2. Initialize the media choosing the NandFlash Init action in the Scripts rolling menu and press Execute
  3. In the same Scripts menu choose the NandFlash Erase All action and press Execute . A Please Wait... dialog window is appearing: wait for the end of the erase process
  4. Press on Send File Name Browse button
  5. Choose the filesystem image file ( x11-image-demo-at91sam9263ek.jffs2 for example) and press Open
  6. Enter the proper address in NAND FLASH in the Address text field. You can find a media map for each product in AT91Bootstrap TODO find chapter in page AT91Bootstrap
  7. Press Send File button. A Please Wait... dialog window is appearing: wait for the end of the flashing process
  8. Close SAM-BA, remove the USB cable

Ok, now you must have a the Linux root filesystem flashed on your board.

Using u-boot commands

Here is a reference documentation about JFFS2 as root filesystem on the u-boot documentation website.

Following commands documentation is available in the u-boot doc/README.nand documentation file.

    1. erase the whole NAND FLASH

U-Boot> nand erase

NAND erase: device 0 whole chip
Skipping bad block at  0x000c0000
Skipping bad block at  0x009c0000
Erasing at 0xffe0000 -- 100% complete.
OK

    2. download the JFFS2 filesystem from TFTP to the board RAM (address 0x21400000)

U-Boot> tftp 0x21400000 x11-image-demo-at91sam9263ek.jffs2
TFTP from server 10.159.240.137; our IP address is 10.159.245.170
Filename 'nferre/x11-image-demo-at91sam9263ek.jffs2'.
Load address: 0x21400000
Loading: T #################################################################
         #######################################################T ##########
         #################################################################
         [..]
        #########################
done
Bytes transferred = 26083328 (18e0000 hex)
    pencil remember the number of Bytes transferred just indicated above. It will be useful for the nand write.jffs2 command.

    3. write the filesystem from RAM@0x21400000 to NAND FLASH at offset 0x0 (Linux /dev/mtdblock0). Note the last parameter : it is the number of Bytes transferred indicated in the previous command.

U-Boot> nand write.jffs2 0x21400000 0x0 0x18e0000

NAND write: device 0 offset 0, size 26083328 ...
Bad block at 0xc0000 in erase block from 0xc0000 will be skipped
Bad block at 0x9c0000 in erase block from 0x9c0000 will be skipped
Writing data at 0x195f800 -- 100% complete.
OK

hand Note that bad blocks just shown above are normal behavior of a NAND FLASH : they are skipped and the filesystem will not mind, it is designed to manage them.

Good, now you have a fresh JFFS2 filesystem you can boot on.

Boot to the installed rootfs

Check Load Linux with u-boot chapter in the u-boot page to know how to load a Linux kernel.

Once loaded, the Linux kernel tries to mount a root file system ; command line parameters can indicate a location of such a rootfs. This option can be specified during the build process of through a u-boot environment variable.

Here is a sample command line for booting at the beginning of the NAND FLASH : address 0x0 indicated in the proper Address text field during the flashing process (step #6).

mem=64M console=ttyS0,115200 root=/dev/mtdblock0 rw rootfstype=jffs2
which leads to the following u-boot command to setup the environment :
setenv bootargs 'mem=64M console=ttyS0,115200 root=/dev/mtdblock0 rw rootfstype=jffs2'
saveenv

Fit application set to your needs

While building the rootfs image

The AT91 demo policy is to bring the user more application to figure out what the capacities of the CPU are. We add then more packages at build time. The way to add packages to a base Angstrom image at building time is to add a new recipe, stating that it requires the base recipe, and to modify the ANGSTROM_EXTRA_INSTAL variable. Basically this is exactly the same thing as extending the RDEPENDS variable (Cf. angstrom-x11-image.bb recipe) :

RDEPENDS = "\
    [..] 
    ${ANGSTROM_EXTRA_INSTALL}"

Check the attached angstrom-x11-image-demo.bb file that extends the angstrom-x11-image.bb rule in the org.openembedded.dev/packages/angstrom/ directory.

ANGSTROM_EXTRA_INSTALL += " \
    <package_name> \
    <another_package_or_task> \
    <..> \
    "

The complete process of how to build the rootfs is described in the How to build Angstrom for AT91 from sources chapter.

This point is discussed in details in this acticle : The correct way to add packages to an OpenEmbedded Image.

With pre-built packets in hands

Referring to the Angstrom Manual, you can check how to install new packages in an existing Angstrom distribution. 5. Installing Software and Package Management. So, there is always the ability to add applications to an already built distribution.

Here is different mean to add packaged applications to a running system.

Install application packages over the network

Reference chapter in the Angstrom manual.

Here is a detailed page about the ipkg system.

/etc/ipkg.conf, /etc/ipkg/*.conf files points towards the servers where the device can pull packages from.

Angstrom feeds are discussed in the Angstrom Wiki.

Informations on packages are stored on particular files : the Packages or Packages.gz files. You can create a feed on you own, building such a file to describe packages content, dependencies and management informations. This file is downloaded to the target while issuing the ipkg update command.

You can create a custom ipkg feed using the ipkg-make-index compiled and installed in the staging directory created during the OpenEmbedded/Angstrom build process.

ipkg-make-index . | gzip > Packages.gz
or if the OE staging directory is not in your path :
path_to_staging_dir/i686-linux/bin/ipkg-make-index . | gzip > Packages.gz

Procedure

On the host machine :

  • construct packages
  • collect packages in a directory (done by the OpenEmbedded system : in path_to_deploy_dir/glibc/ipk/armv5te/)
  • configure your web server to give access to that directory

On the target

  • configure your Ethernet interface
  • check that you can access the web server and the feed (package directory)
  • run ipkg update
  • run ipkg list to see if the package you want is in the "available packages" list
  • run ipkg install
  • check if the package is installed with the ipkg list_installed command

Install application packages from local storage

Reference chapter in the Angstrom manual.

You can pick those packages in the deploy/glibc/ipk/ directory once you built them with bitbake.

You can install .ipk packages from all mass-storage support you can connect to a board.

  • usb key
  • SD/MMC card

META TOPICMOVED by="NicolasFerre" date="1189505684" from="Linux4SAM.OpenEmbeddAngstromUse" to="Linux4SAM.OpenEmbeddedAngstromUse"

Revision 8r8 - 15 Apr 2008 - 13:09:21 - NicolasFerre
Revision 7r7 - 24 Oct 2007 - 08:08:56 - NicolasFerre
Revision 6r6 - 12 Oct 2007 - 15:01:49 - NicolasFerre
Revision 5r5 - 11 Oct 2007 - 09:59:09 - NicolasFerre
Revision 4r4 - 26 Sep 2007 - 08:46:37 - RfoLnx4sam
Revision 3r3 - 11 Sep 2007 - 12:47:34 - NicolasFerre
Revision 2r2 - 11 Sep 2007 - 11:37:42 - NicolasFerre
Revision 1r1 - 11 Sep 2007 - 10:17:12 - NicolasFerre
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Atmel® and others, are registered trademarks or trademarks of Atmel Corporation or its subsidiaries.
ARM® and others are registered trademarks or trademarks of ARM Ltd. Other terms and product names may be trademarks of others.
Ideas, requests, contributions ? Connect to LinksToCommunities page.
Syndicate this site RSSATOM