[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Loading emdebian file system on ARM target from USB stick



On Mon, 2009-04-27 at 12:08 -0300, Amandeep Bhullar wrote:
> Hi
> 
> I do have mkfs.jffs2 installed on my board and am trying to create
> jffs2 filesystem image on the board itself. 
> 
> I gave the command:
> root@at91sam9263ek:/EmdebianFS$ mkfs.jffs2 -e 0x20000 -s 0x800 -o
> emdebian.jffs2  -l
> 
> I took a long time to create it, and came up with the message that no
> space was left on device. Though, I have deleted some stuff and trying
> it again, but I did check the size of emdebian.jffs2 (my output file)
> and it was like 164MB. Should the filesystem image be that big? 
> 
> Aman.
> 

mhh, as far as I can remember you have to specify the source directory
tree and you must not place the output image into that tree.
-r /EmdebianFs -o /tmp/emdebian.jffs2

I had those two options.

> 
> 
> 
> On Thu, Apr 23, 2009 at 11:32 AM, hoefle marco
> <marco.hoefle@nanotronic.ch> wrote:
>         On Thu, 2009-04-23 at 11:13 -0300, Amandeep Bhullar wrote:
>         > Hi
>         >
>         
>         > Thanks for the reply.
>         >
>         > My ARM board AT91SAM9263-EK is running linux that I came
>         with the
>         > board as linux demo. It is running from NAND flash and has a
>         jffs2
>         > filesystem (not NFS). It is probably running an Angstrom
>         based
>         > filesystem. You are right, the NAND flash is partitioned in
>         different
>         > partitions for kernel, rootfs etc. So what I have done is (I
>         dont know
>         > if I did the right thing), copied the emdebian-arm.tgz on a
>         USB stick,
>         > mounted it on the board running linux and gave command tar
>         -xzpf
>         > emdebian-arm.tgz and ./emsecondstage in the folder Emdebian
>         I created.
>         > Here is what happened:
>         
>         Thats also good. nfs allows you to map a folder of our host PC
>         directly
>         into your embedded linux filesystem. So you can exchange data
>         verrry
>         conveniently between target board and host PC.
>         
>         I had this keyring error as well, it is not nice to have this
>         error but
>         my board worked afterwards. Maybe an Emdebian developer can
>         comment
>         this.
>         
>         In the /Emdebian folder (mounted from the USB stick) is now
>         the
>         configured emdebian rootfs.
>         Use the command mkfs.jffs2 directly on the board to make a
>         jffs2 image.
>         If you are lucky this app is installed :-)
>         If not: take the usb stick to your development PC where debian
>         is
>         running. Install the package which contains the mkfs.jffs2 app
>         (I
>         forgott which one contains it. Read the man page carefully
>         (the
>         endianess was also a trap where I fell into).
>         Create the jffs2 image from the Emdebian folder on your USB
>         stick and
>         save it also there afterwards.
>         Back on your board:
>         
>         Save your current rootfs first:
>         
>         cat /dev/mtdblock???
>         > /locationOnUsbStick/original_jffs2_image
>         
>         then put the created emdebian jffs2 image to the according
>         mtdblock also
>         with the cat command.
>         
>         A new boot and emdebian should be up.
>         
>         
>         
>         
>         >
>         ----------------------------------------------------------------------------------------------------
>         > root@at91sam9263ek:/Emdebian$ tar -xzpf emdebian-arm.tgz
>         > root@at91sam9263ek:/Emdebian$ ls
>         > bin                           linuxrc
>         > boot                          mnt
>         > datestring                 proc
>         > debootstrap               root
>         > dev                            sbin
>         > emdebian-archive-keyring.gpg  selinux
>         > emdebian-arm.tgz      sys
>         > emsecondstage          tmp
>         > etc                             usr
>         > home                          var
>         > lib
>         >
>         > root@at91sam9263ek:/Emdebian$ ./emsecondstage
>         > Setting approximate time of 041800242009
>         > Sat Apr 18 00:24:00 UTC 2009
>         > Running ldconfig in /Emdebian ...
>         > Configuring cdebconf
>         > Unknown localized field:
>         > Choices-fr: slushdot, spoiledmeat, leenoox dawt cawm, leenox
>         tuday,
>         > leenox dwat
>         > org, lewn
>         > Unknown localized field:
>         > Description-fr: This is my demo progress bar title in French
>         (yeah,
>         > right)
>         > Unknown localized field:
>         > Description-fr: We like progress in French
>         > Unknown localized field:
>         > Description-fr: This is my demo title in French (yeah,
>         right)
>         > Unknown localized field:
>         > Description-fr: This is my demo info in French (yeah, right)
>         > Configuring ...
>         > Setting up libpam-runtime (1.0.1-5em1) ...
>         > Setting up readline-common (5.2-3.1em1) ...
>         > Setting up libreadline5 (5.2-3.1em1) ...
>         > Setting up libc6 (2.7-18em1) ...
>         > Alignment trap: iconvconfig (2310) PC=0x00009960
>         Instr=0xe5952000
>         > Address=0x0005
>         > 875e FSR 0x013
>         > Alignment trap: iconvconfig (2310) PC=0x00009960
>         Instr=0xe5952000
>         > Address=0x0005
>         > 876a FSR 0x013
>         > Alignment trap: iconvconfig (2310) PC=0x00009960
>         Instr=0xe5952000
>         > Address=0x0005
>         > 8786 FSR 0x001
>         > Setting up busybox (1:1.11.1-1em1) ...
>         > Setting up zlib1g (1:1.2.3.3.dfsg-12em1) ...
>         > Setting up libgcc1 (1:4.3.2-1.1em1) ...
>         > Setting up libncurses5 (5.7+20090124-1em1) ...
>         > Setting up sed (4.1.5-8em1) ...
>         > Setting up base-passwd (3.5.20em1) ...
>         >
>         > update-passwd has found some differences between your system
>         accounts
>         > and the current Debian defaults. It is advisable to allow
>         > update-passwd
>         > to change your system; without those changes some packages
>         might not
>         > work
>         > correctly.  For more documentation on the Debian account
>         policies
>         > please
>         > see /usr/share/doc/base-passwd/README.
>         >
>         > The list of proposed changes is:
>         >
>         > Adding group "dialout" (20)
>         > Adding group "fax" (21)
>         > Adding group "voice" (22)
>         > Adding group "cdrom" (24)
>         > Adding group "floppy" (25)
>         > Adding group "tape" (26)
>         > Adding group "sudo" (27)
>         > Adding group "dip" (30)
>         > Adding group "www-data" (33)
>         > Adding group "backup" (34)
>         > Adding group "operator" (37)
>         > Adding group "list" (38)
>         > Adding group "irc" (39)
>         > Adding group "src" (40)
>         > Adding group "gnats" (41)
>         > Adding group "shadow" (42)
>         > Adding group "sasl" (45)
>         > Adding group "plugdev" (46)
>         > Adding group "staff" (50)
>         > Adding group "games" (60)
>         > Adding group "users" (100)
>         > Adding group "nogroup" (65534)
>         > Would commit 22 changes
>         >
>         > It is highly recommended that you allow update-passwd to
>         make these
>         > changes
>         > (a backup file of modified files is made with the
>         extension .org so
>         > you can
>         > always restore the current settings).
>         >
>         > Okay, I am going to make the necessary updates now
>         > Adding group "dialout" (20)
>         > Adding group "fax" (21)
>         > Adding group "voice" (22)
>         > Adding group "cdrom" (24)
>         > Adding group "floppy" (25)
>         > Adding group "tape" (26)
>         > Adding group "sudo" (27)
>         > Adding group "dip" (30)
>         > Adding group "www-data" (33)
>         > Adding group "backup" (34)
>         > Adding group "operator" (37)
>         > Adding group "list" (38)
>         > Adding group "irc" (39)
>         > Adding group "src" (40)
>         > Adding group "gnats" (41)
>         > Adding group "shadow" (42)
>         > Adding group "sasl" (45)
>         > Adding group "plugdev" (46)
>         > Adding group "staff" (50)
>         > Adding group "games" (60)
>         > Adding group "users" (100)
>         > Adding group "nogroup" (65534)
>         > 22 changes have been made, rewriting files
>         > Writing passwd-file to /etc/passwd
>         > Writing shadow-file to /etc/shadow
>         > Writing group-file to /etc/group
>         > Setting up libdebian-installer4 (0.61em1) ...
>         > Setting up libslang2 (2.1.3-3em1) ...
>         > Setting up libbz2-1.0 (1.0.5-1em1) ...
>         > Setting up libvolume-id0 (0.125-7em2) ...
>         > Setting up libselinux1 (2.0.65-5em1) ...
>         > Setting up libstdc++6 (4.3.2-1.1em1) ...
>         > Setting up debianutils (2.31em1) ...
>         > Setting up makedev (2.3.1-88em1) ...
>         > Setting up gpgv (1.4.9-3em1) ...
>         > Setting up lzma (4.43-14em1) ...
>         > Setting up libpopt0 (1.14-4em1) ...
>         > Setting up libtextwrap1 (0.1-6em1) ...
>         > Setting up ncurses-bin (5.7+20090124-1em1) ...
>         > Setting up apt (0.7.20.2em1) ...
>         > Setting up libsepol1 (2.0.30-2em1) ...
>         > Setting up base-files (5em1) ...
>         > Setting up libdevmapper1.02.1 (2:1.02.27-4em1) ...
>         > Setting up libcomerr2 (1.41.3-1em1) ...
>         > Setting up gnupg (1.4.9-3em1) ...
>         > Setting up libnewt0.52 (0.52.2-11.3em1) ...
>         > Setting up libss2 (1.41.3-1em1) ...
>         > Setting up debian-archive-keyring (2009.01.31em1) ...
>         > gpg: symbol lookup error: /lib/libreadline.so.5: undefined
>         symbol: PC
>         > gpg: symbol lookup error: /lib/libreadline.so.5: undefined
>         symbol: PC
>         > gpg: symbol lookup error: /lib/libreadline.so.5: undefined
>         symbol: PC
>         > dpkg: error processing debian-archive-keyring (--configure):
>         > subprocess post-installation script returned error exit
>         status 127
>         > Setting up dpkg (1.14.25em1) ...
>         > Setting up sysvinit-utils (2.86.ds1-61em1) ...
>         > Setting up cdebconf (0.138lenny2em1) ...
>         > Setting up dhcp3-common (3.1.1-6em1) ...
>         > Setting up lsb-base (3.2-20em1) ...
>         > Setting up libpam0g (1.0.1-5em1) ...
>         > Setting up whiptail (0.52.2-11.3em1) ...
>         > Setting up libpam-modules (1.0.1-5em1) ...
>         > Setting up tzdata (2008i-3em1) ...
>         >
>         > User defined timezone, leaving /etc/localtime unchanged.
>         > date: invalid date 'Sat Apr 18 00:24:55 UTC 2009'
>         > Setting up dhcp3-client (3.1.1-6em1) ...
>         > Setting up debconf-shell (1.5.24em1) ...
>         > Unknown localized field:
>         > Choices-fr: slushdot, spoiledmeat, leenoox dawt cawm, leenox
>         tuday,
>         > leenox dwat
>         > org, lewn
>         > Unknown localized field:
>         > Unknown localized field:
>         > Unknown localized field:
>         > Description-fr: We like progress in French
>         > Unknown localized field:
>         > Description-fr: This is my demo title in French (yeah,
>         right)
>         > Unknown localized field:
>         > Description-fr: This is my demo info in French (yeah, right)
>         > Setting up e2fslibs (1.41.3-1em1) ...
>         > Setting up passwd (1:4.1.1-6em1) ...
>         > Shadow passwords are now on.
>         > Setting up udev (0.125-7em2) ...
>         > unable to open device '/class/net/*'
>         > A chroot environment has been detected, udev not started.
>         > Setting up module-init-tools (3.4-1em3) ...
>         > Configuration for arm not found, trying arm.generic
>         > Architecture-specific config file not found
>         > Setting up libuuid1 (1.41.3-1em1) ...
>         > Setting up libblkid1 (1.41.3-1em1) ...
>         > Setting up e2fsprogs (1.41.3-1em1) ...
>         > Setting up util-linux (2.13.1.1-1em1) ...
>         > Setting up mount (2.13.1.1-1em1) ...
>         > Setting up initscripts (2.86.ds1-61em1) ...
>         > Errors were encountered while processing:
>         > debian-archive-keyring
>         > root@at91sam9263ek:/Emdebian$
>         >
>         --------------------------------------------------------------------------------------------------
>         >
>         > My question is - di dI do the right thing? What is the error
>         about
>         > debian-archive-keyring :
>         >
>         > "Setting up debian-archive-keyring (2009.01.31em1) ...
>         > gpg: symbol lookup error: /lib/libreadline.so.5: undefined
>         symbol: PC
>         > gpg: symbol lookup error: /lib/libreadline.so.5: undefined
>         symbol: PC
>         > gpg: symbol lookup error: /lib/libreadline.so.5: undefined
>         symbol: PC
>         > dpkg: error processing debian-archive-keyring (--configure):
>         > subprocess post-installation script returned error exit
>         status 127 "
>         >
>         > If I was not to run it from within linux, then how should I?
>         Please
>         > help.Thanks.
>         >
>         > Aman.
>         >
>         >
>         >
>         >
>         > On Wed, Apr 22, 2009 at 12:15 PM, hoefle marco
>         > <marco.hoefle@nanotronic.ch> wrote:
>         >
>         >         On Tue, 2009-04-21 at 11:38 -0300, Amandeep Bhullar
>         wrote:
>         >         > Hi
>         >         >
>         >         > I am reading instructions for installing emdebian
>         at
>         >         > http://www.emdebian.org/release/crush/c229.html
>         >         > I am not clear about a few things. Please help.
>         >         >
>         >         > I have the emdebian filesystem  tarball
>         emdebian-arm.tgz and
>         >         linux
>         >         > kernel uImage for ARM.
>         >         > On my target ARM board i am running U-boot 2009.03
>         and that
>         >         recognizes
>         >         > my USB stick (1GB formatted FAT) and has the files
>         uImage
>         >         and
>         >         > emdebian-arm.tgz
>         >         > --------------------------
>         >         > U-Boot> usb start
>         >         > (Re)start USB...
>         >         > USB:   scanning bus for devices... 2 USB Device(s)
>         found
>         >         >        scanning bus for storage devices... 1
>         Storage
>         >         Device(s) found
>         >         > -------------------------
>         >         > Next step is to decompress the tarball, but I am
>         not sure
>         >         how will I
>         >         > do it from U-boot command prompt or it is NOT to
>         be given
>         >         from U-boot
>         >         > command prompt? Where do I give the command tar
>         -xzpf
>         >         > emdebian-arm.tgz ? I am confused.
>         >
>         >         Hello Aman,
>         >         uboot itself has by default no tar decompression
>         command. You
>         >         need to
>         >         extract the tarball using your host PC on your USB
>         stick.
>         >         uImage is the
>         >         kernel image itself I suppose, without rootfs?
>         >         To boot the kernel together with emdebian rootfs you
>         can set
>         >         the
>         >         bootargs variable in uboot: set bootargs
>         root=/dev/...
>         >         console=ttyS..
>         >
>         >         The problem here is that the tarball you created is
>         not a
>         >         working rootfs
>         >         (anybody out there please correct me if I am wrong).
>         The flow
>         >         requires
>         >         to have a running system or at least a boot loader
>         with a
>         >         chroot
>         >         command.
>         >
>         >         Here is what I have done:
>         >         I had a working system with nfs support on the arm
>         board. I
>         >         copied the
>         >         emdebian-arm.tgz to a folder in the nfs tree so that
>         the arm
>         >         system
>         >         could access it.
>         >         Afterwards I used chroot on the target and executed
>         the script
>         >         emsecondstage which configures the rootfs. Then I
>         quit the
>         >         chroot
>         >         environment and made a JFFS2 flash image from the
>         configured
>         >         emdebian
>         >         root file system directly on the target (The Kernel
>         needs to
>         >         be
>         >         configured with JFFS2 support). The command is
>         mkfs.jffs2.
>         >         The flash was partitioned in several sections, one
>         for the
>         >         bootloader
>         >         uboot, one for the kernel and one for the rootfs.
>         >         The jffs image was copied to the rootfs flash
>         section.
>         >
>         >         After this was done I set the bootargs environment
>         to tell the
>         >         kernel to
>         >         use the jffs2 flash section for the rootfs.
>         >
>         >         I hope this is not too confusing ;-)
>         >
>         >
>         >
>         >
>         >
>         >         >
>         >         > Thanks again for helping me guys.
>         >         > Aman.
>         >
>         >
>         >
>         
>         
> 


Reply to: