LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile
User Name
Password
Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Sailfish OS, Replicant, Ubuntu Touch, webOS, and other similar projects and products.

Notices


Reply
  Search this Thread
Old 03-01-2011, 02:26 PM   #1
barr16
LQ Newbie
 
Registered: Mar 2011
Posts: 2

Rep: Reputation: 0
android fails to mount nand yaffs2 system image


Hi All,

I am bringing up a new board which is based on the Samsung SMDKV210 development kit. The kernel is 2.6.32 and it is Android Froyo. I have fixed some bootloader issues and modified the kernel to match our board.

During the boot up, I get to the point where the yaffs system image is mounted, and it appears to complete correctly. However, after the system is mounted, I get errors that binaries in /system/bin/ cannot be found.

Iíve searched the forums and have found others with similar issues which turned out to be permission issues. Iíve tried all of their suggestions and have not been able to solve the issue.

The unusual part of this issue is that I can build the system for the development kit without any issue, and the modifications between the development kit build and our board build are minimal. So I do not see how any of the changes that were made for our board would effect the file system and itís ability to be mounted. Also I do not see how this could be a hardware issue since we are reading the images from the NAND.

Any suggestions would be greatly appreciated.

Here is the part of the log where I am getting stuck:

--- joe, LINE: 291, name: ro.hardware
-yaffs: dev is 32505860 name is "mtdblock4"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.4, "mtdblock4"
-- joe, LINE: 291, name: ro.revision
--- joe, property set
yaffs_read_super: isCheckpointed 0
yaffs: dev is 32505862 name is "mtdblock6"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.6, "mtdblock6"
yaffs_read_super: isCheckpointed 0
yaffs: dev is 32505861 name is "mtdblock5"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.5, "mtdblock5"
yaffs_read_super: isCheckpointed 0
--- joe, drain action queue
--- joe, in load_properties_from_file, file read
--- init: cannot find '/system/bin/sh', disabling 'console'
init: cannot find '/system/bin/pvrsrvinit', disabling 'pvrsrvinit'
init: cannot find '/system/bin/servicemanager', disabling 'servicemanager'
init: cannot find '/system/bin/vold', disabling 'vold'
init: cannot find '/system/bin/netd', disabling 'netd'
init: cannot find '/system/bin/debuggerd', disabling 'debuggerd'
init: cannot find '/system/bin/rild', disabling 'ril-daemon'
init: cannot find '/system/bin/app_process', disabling 'zygote'
init: cannot find '/system/bin/mediaserver', disabling 'media'
init: cannot find '/system/bin/dbus-daemon', disabling 'dbus'
init: cannot find '/system/bin/installd', disabling 'installd'
init: cannot find '/system/etc/install-recovery.sh', disabling 'flash_recovery'
init: cannot find '/system/bin/keystore', disabling 'keystore'
joe, in load_properties_from_file, file read
--- joe, in load_properties_from_file, file read
F:system/core/init/init.c, main():984 device_fd: 4
 
Old 03-02-2011, 02:00 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, RPi OS, Mint & Android
Posts: 13,103

Rep: Reputation: 1753Reputation: 1753Reputation: 1753Reputation: 1753Reputation: 1753Reputation: 1753Reputation: 1753Reputation: 1753Reputation: 1753Reputation: 1753Reputation: 1753
Condensing your post, the only error I see is
Quote:
yaffs_read_super: isCheckpointed 0
--- joe, drain action queue
--- joe, in load_properties_from_file, file read
--- init: cannot find '/system/bin/sh', disabling 'console'
So wherever that mounted, it wasn't on /system/bin

What actually happened? Apart from the fact that it didn't read anything on /system/bin, any idea what is going on? I'd love to see an error
 
Old 03-03-2011, 10:19 AM   #3
barr16
LQ Newbie
 
Registered: Mar 2011
Posts: 2

Original Poster
Rep: Reputation: 0
I guess that is why this is giving me such a hard time. I do not see any errors. Everything seems to work fine, but I can't see /system. The system never gets to the shell, so I can't run any debug commands. Is there anything that I could do to figure out what is really being mounted? I'm assuming that /system is part of the system.img which is flashed to the NAND. Is there a way for me to verify that /system is actually part of system.img?

Thanks
-Barry
 
Old 03-03-2011, 04:31 PM   #4
justboo2u
Member
 
Registered: Feb 2011
Distribution: Ubuntu, Debian(ARM),XP,W7,CP/M
Posts: 126

Rep: Reputation: 20
Quote:
Originally Posted by barr16 View Post
I guess that is why this is giving me such a hard time. I do not see any errors. Everything seems to work fine, but I can't see /system. The system never gets to the shell, so I can't run any debug commands. Is there anything that I could do to figure out what is really being mounted? I'm assuming that /system is part of the system.img which is flashed to the NAND. Is there a way for me to verify that /system is actually part of system.img?

Thanks
-Barry
You could load system.img into a working linux filesystem but I cannot remember of-the-top how that was done... alzheimers, you know.
That would allow you to see (& modify?) the contents of the .img


EDIT:
mount -o loop system.img /mnt/sysimg (or whereever)

Last edited by justboo2u; 03-03-2011 at 10:27 PM.
 
Old 04-20-2011, 03:18 PM   #5
Asure
LQ Newbie
 
Registered: Apr 2011
Posts: 4

Rep: Reputation: 0
Working on a similar situation: I'm attempting to get our 'dropad a8' tablet to boot self built kernels. We have a working u-boot on the nand, and on SD, but no sourcecode for it. Apart from being a GPL violation from the factory, it's a pain in the butt...

@barr16, can you disclose what you did to get your kernel booting? Everything we try to do with similar xxx210 kernels (mango210, smdkv210, odroid) just hangs @ u-boot saying "Starting kernel ..." and that's it. I checked machine number (0x0998, 2456) and that matches. Tried uart0 and 1 for output of debug, low level printk.. nothing comes out and the board appears to freeze up. Can you tell us how you got u-boot and kernel working to actually boot your kernel?
 
Old 04-20-2011, 03:53 PM   #6
kboek
LQ Newbie
 
Registered: Apr 2011
Location: Porsgrunn, Norway
Distribution: Android, Ubuntu
Posts: 5

Rep: Reputation: 0
Hi barr16 and Asure,

I've been struggling with Boardcon's S5PV210 KIT, which also is based on the S5PV210 processor and a copy of Samsung's SMDKV210 board. I've cloned the kernel from http://android.git.kernel.org/?p=kernel/samsung.git and I'm now building in support for devices one by one. The big problem I have is that I get an error when starting Android (after the kernel), see my message at http://www.linuxquestions.org/questi...-panic-875931/

How 'bout we work through this together? barr16, if you have the source code of the image, you can compile the platform, and then check the following folder: /out/target/product/<product name>/root, there should be a /system folder there. Alternatively, check if the system folder is found separately in /out/target/product/<product name>/system. If neither of them's there, something might be wrong with the source. Also, check the init.rc and optionally the init.<product name>.rc to see if the system folder is created/symlinked there (shouldn't be, but you never know)

Õf you have the source code, would you mind sharing with me? I'm having a hard time finding out about why my boot ends in a kernel panic, and browsing your source code might help.

Asure, you telling that the Dropad A8 came factory installed with a hanging kernel? That would be worst I've ever seen. Are there any specs of this Dropad, and have you tried building the kernel yourselves? If so, let me have a look at it...

If you guys want, I'll be happy to share the source code I've edited so far, just let me know.
 
Old 04-20-2011, 04:01 PM   #7
Asure
LQ Newbie
 
Registered: Apr 2011
Posts: 4

Rep: Reputation: 0
The board/tablet comes with a working kernel, but well, we'd like to have overclocking and other goodies as well. Plus we'll need to mod up the kernel for Gingerbread too.
Most of the information gathered thus far is stored here: slatedroid.com/topic/15907-dev-custom-kernel-for-dropadherotab/
This includes board pics, dmesg, etc.

I've been trying different kernels from similar boards, mango210, odroid, and so on. But they never start the uncompress stage, so that's why i came looking here

Probably, our memory config may be wrong, the machine crashes at a really early stage. What did you need to edit, in order for samsung's git to boot?
Does our dmesg help/provide info? I'm no programmer, but good at seeing the logic in programming languages
 
Old 04-20-2011, 05:16 PM   #8
kboek
LQ Newbie
 
Registered: Apr 2011
Location: Porsgrunn, Norway
Distribution: Android, Ubuntu
Posts: 5

Rep: Reputation: 0
The most important things are:
  1. The .config file
  2. The machine setup (arch/arm/mach-s5pv210/mach-<boardname>.c, it contains the some setup for the boot process (e.g. which drivers to load at kernel boot time)
  3. The setups for the memory, registers and clock. The setup for memory is found in arch/arm/mach-s5pv210/include/mach/map.h, while the setup for registers and clocks are spread in different header files in:
    • arch/arm/mach-s5pv210/include/mach/
    • arch/arm/plat-samsung/include/plat/
    • arch/arm/plat-s5p/include/plat
There's a lot of configuration that has to be right to make your board work, but the memory settings for all devices that are supported by the processor itself (USB, UART, etc.) is - of course - the same for all boards that have this processor. Assuming that all "internal" settings are right, you'll only have to check for settings of "external" devices, i.e. Ethernet

Now, I see that you've had some problems with connecting to a serial port, but if (or once) you got that, it'll make things a lot easier. Just check your .config file for the following settings:

CONFIG_S3C_LOWLEVEL_UART_PORT=0
CONFIG_DEBUG_S3C_UART=0


This will output all console message to UART0 (COM1). My guess is that your system does more after "done, booting the kernel...", but that the console output is sent to the wrong port.

If the board is based on or manufactured by URBETTER, then it might very well be a lot of the same as the board I've got here, since it's a URBETTER board too (although marketed by Boardcon).
 
Old 04-21-2011, 03:02 AM   #9
Asure
LQ Newbie
 
Registered: Apr 2011
Posts: 4

Rep: Reputation: 0
I've taken the android git kernel and tried to compile the smdkv210 defconfig, but that dies on an undefined uart reference:

Code:
arch/arm/plat-s5p/built-in.o: In function `s5p_init_irq':
arch/arm/plat-s5p/irq.c:96: undefined reference to `s3c_irq_wake'
drivers/built-in.o: In function `s3c24xx_serial_init_port':
drivers/serial/samsung.c:1152: undefined reference to `s3c_setup_uart_cfg_gpio'
Looking at the 'mach-herring.c / gpio-herring' for reference, i see there's several gpio-uarts. Compared to mach-smdkv210.. mach-smdkv210 seems pretty empty..

If you have some files from Urbetter, please share them somewhere, so we can check if our boards match up!
GIT would be great! Those are GPL anyway, so it would be excellent to get them out someway!
Note, i mailed Urbetter for source code, but they won't give it out Chinese+GPL is a bad combination..

We'd prefer to use the 2.6.32.x source since Urbetter has included drivers in .ko format for the touchscreen interface, which will be a pain to reverse engineer and bring up later. Same for the PVR stuff and on-board wireless (at9k) device.

Edit:
Code:
CONFIG_S3C_LOWLEVEL_UART_PORT=0
CONFIG_DEBUG_S3C_UART=0
That was the first thing i tested (also tried port=1, port=2..) but offcourse no output so far..

Last edited by Asure; 04-21-2011 at 05:24 AM.
 
Old 04-21-2011, 01:32 PM   #10
kboek
LQ Newbie
 
Registered: Apr 2011
Location: Porsgrunn, Norway
Distribution: Android, Ubuntu
Posts: 5

Rep: Reputation: 0
The DVD that came with the eval. board we bought contained the source code for u-boot, kernel (2.6.29) and Android (2.1). I started using Github today, and so far I've managed to "upload" the kernel source code. See https://github.com/kboek/android-urbetter. My intention is to add the other sources (u-boot and android), and I'll also include the sources that I've been working on trying to port gingerbread to this board.

If you want rw access, create a github account and let me know your account name, and I'll add you as a collaborator.
 
Old 04-21-2011, 02:01 PM   #11
Asure
LQ Newbie
 
Registered: Apr 2011
Posts: 4

Rep: Reputation: 0
Thats great, thank you for uploading this code from them!
I'm building a kernel with it now (console on ttySAC0, uart 0) and hope it at least boots a bit.. I'm not too skilled to reverse engineer the whole board

Edit: It works!! (at least, the tty uart debug and boot part!)

http://pastie.org/1820153

Last edited by Asure; 04-21-2011 at 02:19 PM. Reason: Bootlog!
 
Old 04-25-2011, 09:08 AM   #12
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
barr16,

Welcome to LQ. Hope you like it here.

Please put code, command line output, config files, etc. inside [CODE] tags, aka "Code:" blocks.

It will make your posts easier to read, & that will get you more, faster, better answers. -- Help us help you.
BTW, You can edit your post(s) to do this retroactively.

Thank you.

Again, welcome.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to mount root fs: s3c2410 based board, Nand flash swapnilborg Linux - Embedded & Single-board computer 4 10-07-2011 11:43 AM
Can not get my root file system booted from NAND priyadarshan Linux - Software 3 12-10-2010 03:18 AM
LXer: YAFFS2: Yet Another Flash File System LXer Syndicated Linux News 0 07-31-2010 12:20 AM
Why can't i get GUI on mini2440 when NAND flashing qt image? neo3matrix Linux - Newbie 0 11-03-2009 06:11 AM
make bootable CD from hard disk image and mount root file system as ramfs Mr.J Linux - Embedded & Single-board computer 1 08-19-2008 07:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile

All times are GMT -5. The time now is 06:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration