How come your partitions in Linux for MTD don't match the address you are writing to in U-Boot? You need to match those up to make sure that the filesystem is in the right place to be usable to Linux..
-- Ashwin On Fri, Apr 30, 2010 at 6:46 AM, hadhami riahi <[email protected]> wrote: > Hello, > I'm porting Android to imx51 target and I'm trying to write the file > system to the internal target's NAND. > I've tried several approachs but none of them did work! > The las one is: > -in the host: > cd android_freescale/out/target/product/imx51_BBG > mkdir ram > cp -Rfp android_freescale/out/target/product/imx51_BBG/root/* ram > cp -Rfp /android_freescale/out/target/product/imx51_BBG/system/ ram > cp -Rfp android_freescale/out/target/product/imx51_BBG/data/ ram > mkfs.jffs2 -n -r ram -e 128 -o rootfs.jffs2 > cp rootfs.jffs2 /var/lib/tftboot > -in uboot: > BBG U-Boot > setenv bootfile uImage > BBG U-Boot > setenv loadaddr 0x90800000 > BBG U-Boot > dhcp > BBG U-Boot > nand erase 0x00060000 0x260000 > BBG U-Boot > nand write 0x90800000 0x00060000 0x260000 > BBG U-Boot > setenv bootfile rootfs.jffs2 > BBG U-Boot > setenv loadaddr 0x90B00000 > BBG U-Boot > dhcp > BBG U-Boot > nand erase 0x00360000 0x2A427CC > BBG U-Boot > nand write.jffs2 0x90B00000 0x00360000 0x2DA0000 > BBG U-Boot > setenv bootcmd_nand2 'nboot 90800000 0 60000;bootm' > setenv bootargs 'console=ttymxc0,115200 androidboot.console=ttymxc0 > wvga calibration init=/init root=/dev/mtdblock2 rw rootfstype=jffs2' > > But I got this log: > Loading from NAND 512MiB 1,8V 8-bit, offset > 0x60000 > Image Name: Linux-2.6.28-00007- > gfa88f73-0058 > Image Type: ARM Linux Kernel Image > (uncompressed) > Data Size: 2196264 Bytes = 2.1 > MB > Load Address: > 90008000 > Entry Point: > 90008000 > ## Booting kernel from Legacy Image at > 90800000 ... > Image Name: Linux-2.6.28-00007- > gfa88f73-0058 > Image Type: ARM Linux Kernel Image > (uncompressed) > Data Size: 2196264 Bytes = 2.1 > MB > Load Address: > 90008000 > Entry Point: > 90008000 > Verifying Checksum ... > OK > Loading Kernel Image ... > OK > OK > > Starting > kernel ... > > Uncompressing > Linux................................................................................................................................................ > done, b. > Linux version 2.6.28-00007-gfa88f73-00580-gb9c8340-dirty > (hri...@eukrea-desktop) (gcc version 4.1.2) #31 PREEMPT Thu Apr 29 > 09:41:45 CEST 2010 > CPU: ARMv7 Processor [412fc081] revision 1 (ARMv7), > cr=10c5387f > CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction > cache > Machine: Freescale MX51 3-Stack > Board > fixup_mxc_board > 1550 > fixup_mxc_board > 1553 > fixup_mxc_board > 1556 > fixup_mxc_board > 1558 > fixup_mxc_board > 1571 > fixup_mxc_board > 1571 > fixup_mxc_board > 1571 > fixup_mxc_board > 1571 > fixup_mxc_board > 1571 > fixup_mxc_board > 1584 > fixup_mxc_board > 1586 > Memory policy: ECC disabled, Data cache > writeback > Built 1 zonelists in Zone order, mobility grouping on. Total pages: > 97408 > Kernel command line: console=ttymxc0,115200 > androidboot.console=ttymxc0 wvga calibration init=/init root=/dev/ > mtdblock2 rw rootfstype=jffs2 > Unknown boot option `androidboot.console=ttymxc0': > ignoring > MXC IRQ > initialized > PID hash table entries: 2048 (order: 11, 8192 > bytes) > mx51_3stack_timer_init > 1718 > mx51_3stack_timer_init > 1721 > mxc_clocks_init > 3577 > mxc_clocks_init > 3592 > mxc_clocks_init > 3603 > mxc_clocks_init > 3608 > mxc_clocks_init > 3617 > mxc_clocks_init > 3620 > mxc_clocks_init > 3626 > mxc_clocks_init > 3629 > mxc_clocks_init > 3633 > mxc_clocks_init > 3643 > mxc_clocks_init > 3651 > mxc_clocks_init > 3660 > mxc_clocks_init > 3664 > mxc_clocks_init > 3673 > mxc_clocks_init > 3682 > mxc_clocks_init > 3694 > mxc_clocks_init > 3703 > mxc_clocks_init > 3707 > mxc_clocks_init > 3716 > mxc_clocks_init > 3724 > mxc_clocks_init > 3729 > mxc_clocks_init > 3733 > mxc_clocks_init > 3743 > mxc_clocks_init > 3747 > mxc_clocks_init > 3758 > mxc_clocks_init > 3768 > mxc_clocks_init > 3773 > mxc_clocks_init > 3776 > mxc_clocks_init > 3781 > mxc_clocks_init > 3784 > mxc_clocks_init > 3786 > mxc_clocks_init > 3784 > mxc_clocks_init > 3786 > mxc_clocks_init > 3808 > mxc_clocks_init > 3811 > mxc_clocks_init > 3817 > mxc_clocks_init > 3820 > mxc_clocks_init > 3825 > mxc_clocks_init > 3833 > mxc_clocks_init > 3845 > mx51_3stack_timer_init > 1728 > mx51_3stack_timer_init > 1730 > Console: colour dummy device > 80x30 > Dentry cache hash table entries: 65536 (order: 6, 262144 > bytes) > Inode-cache hash table entries: 32768 (order: 5, 131072 > bytes) > Memory: 192MB 192MB = 384MB > total > Memory: 384472KB available (4184K code, 711K data, 132K > init) > SLUB: Genslabs=12, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, > Nodes=1 > Calibrating delay loop... 799.53 BogoMIPS > (lpj=3997696) > Mount-cache hash table entries: > 512 > CPU: Testing write buffer coherency: > ok > net_namespace: 288 > bytes > regulator: core version > 0.5 > NET: Registered protocol family > 16 > mxc_board_init > 1656 > CPU is i.MX51 Revision > 2.0 > mxc_board_init > 1658 > MXC GPIO > hardware > mxc_board_init > 1660 > mxc_board_init > 1662 > mxc_board_init > 1664 > IRAM > READY > mxc_pwm_device > registered > pwm-backlight device > registered > mxc_board_init > 1666 > Using SDMA > I.API > MXC DMA API > initialized > SCSI subsystem > initialized > usbcore: registered new interface driver > usbfs > usbcore: registered new interface driver > hub > usbcore: registered new device driver > usb > MXC I2C > driver > MXC I2C > driver > MXC HS I2C > driver > IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), > 5F(6,7) > Bluetooth: Core ver > 2.14 > NET: Registered protocol family > 31 > Bluetooth: HCI device and connection manager > initialized > Bluetooth: HCI socket layer > initialized > NET: Registered protocol family > 2 > IP route cache hash table entries: 4096 (order: 2, 16384 > bytes) > TCP established hash table entries: 16384 (order: 5, 131072 > bytes) > TCP bind hash table entries: 16384 (order: 4, 65536 > bytes) > TCP: Hash tables configured (established 16384 bind > 16384) > TCP reno > registered > NET: Registered protocol family > 1 > regulator: Unable to get requested regulator: > SW1 > LPMode driver module > loaded > Static Power Management for Freescale > i.MX51 > PM driver module > loaded > sdram autogating driver module > loaded > Bus freq driver module > loaded > usb: DR host (utmi) > registered > mxc_dvfs_core_probe > regulator: Unable to get requested regulator: > SW1 > mxc_dvfs_core_probe: failed to get gp > regulator > DVFS driver module > loaded > i.MXC CPU frequency > driver > regulator: Unable to get requested regulator: > SW1 > mxc_cpufreq_driver_init: failed to get gp > regulator > ashmem: > initialized > JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, > Inc. > msgmni has been set to > 751 > io scheduler noop > registered > io scheduler anticipatory > registered > io scheduler deadline > registered > io scheduler cfq registered > (default) > fbcvt: 1024x...@60: CVT Name - . > 786M3 > mxc_ipu mxc_ipu: Channel already disabled > 9 > mxc_ipu mxc_ipu: Channel already uninitialized > 9 > IPU DMFC DP HIGH RESOLUTION: 1(0,1), 5B(2~5), > 5F(6,7) > Console: switching to colour frame buffer device > 128x48 > fbcvt: 1024x...@60: CVT Name - . > 786M3 > tve: probe of tve.0 failed with error > -16 > Serial: MXC Internal UART > driver > mxcintuart.0: ttymxc0 at MMIO 0x73fbc000 (irq = 31) is a Freescale > MXC > console [ttymxc0] > enabled > mxcintuart.1: ttymxc1 at MMIO 0x73fc0000 (irq = 32) is a Freescale > MXC > mxcintuart.2: ttymxc2 at MMIO 0x7000c000 (irq = 33) is a Freescale > MXC > loop: module > loaded > pmem_adsp: 0 > init > pmem_gpu: 1 > init > logger: created 64K log > 'log_main' > logger: created 256K log > 'log_events' > logger: created 64K log > 'log_radio' > FEC ENET Version > 0.2 > fec: PHY @ 0xf, ID 0x0007c0c4 -- > LAN8700 > eth0: ethernet > 00:12:34:56:78:90 > PPP generic driver version > 2.4.2 > Linux video capture interface: > v2.00 > MXC Video Output MXC Video Output.0: Registered device > video0 > Driver 'sd' needs updating - please use bus_type > methods > MXC MTD nand Driver > 2.5 > NAND device: Manufacturer ID: 0x2c, Chip ID: 0xac (Micron NAND 512MiB > 1,8V 8- > bit) > UnCorrectable RS-ECC > Error > UnCorrectable RS-ECC > Error > RedBoot partition parsing not > available > Creating 4 MTD partitions on "NAND 512MiB 1,8V 8- > bit": > 0x00000000-0x00700000 : > "BOOT" > 0x00700000-0x00800000 : > "MISC" > 0x00800000-0x01c00000 : > "RECOVERY" > 0x01c00000-0x20000000 : > "ROOT" > usbmon: debugfs is not > available > ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) > Driver > fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host > Controller > fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number > 1 > fsl-ehci fsl-ehci.0: irq 18, io mem > 0x73f80000 > fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI > 1.00 > usb usb1: configuration #1 chosen from 1 > choice > hub 1-0:1.0: USB hub > found > hub 1-0:1.0: 1 port > detected > Initializing USB Mass Storage > driver... > usbcore: registered new interface driver usb- > storage > USB Mass Storage support > registered. > mice: could not register psaux device, error: > -16 > mice: PS/2 mouse device common for all > mice > i2c /dev entries > driver > MXC WatchDog Driver > 2.0 > clk: Unable to get requested clock: > wdog_clk > MXC Watchdog # 0 Timer: initial timeout 60 > sec > Bluetooth: Virtual HCI driver ver > 1.2 > Bluetooth: HCI UART driver ver > 2.2 > Bluetooth: HCI BCSP protocol > initialized > SCC2: Driver Status is > OK > Sahara HW Version is > 0x27000410 > ioctl pointer: c026e5bc. mmap pointer: > c026f2d8 > In fsh_shw_smalloc (km): partition_base:dc99c000 partition_base_phys: > 1fffc000 > writing UMID and MAP to secure the > partition > VPU > initialized > mxsdhci: MXC Secure Digital Host Controller Interface > driver > mxsdhci: MXC SDHCI Controller > Driver. > mmc0: SDHCI detect irq 128 irq 1 INTERNAL > DMA > mxsdhci: MXC SDHCI Controller > Driver. > mmc1: SDHCI detect irq 0 irq 2 INTERNAL > DMA > usb 1-1: new low speed USB device using fsl-ehci and address > 2 > usbcore: registered new interface driver > usbhid > usbhid: v2.6:USB HID core > driver > Advanced Linux Sound Architecture Driver Version > 1.0.18rc3. > ALSA device > list: > #0: Dummy > 1 > TCP cubic > registered > NET: Registered protocol family > 17 > Bluetooth: L2CAP ver > 2.11 > Bluetooth: L2CAP socket layer > initialized > Bluetooth: SCO (Voice Link) ver > 0.6 > Bluetooth: SCO socket layer > initialized > Bluetooth: RFCOMM socket layer > initialized > Bluetooth: RFCOMM TTY layer > initialized > Bluetooth: RFCOMM ver > 1.10 > Bluetooth: BNEP (Ethernet Emulation) ver > 1.3 > Bluetooth: BNEP filters: protocol > multicast > Bluetooth: HIDP (Human Interface Emulation) ver > 1.2 > RPC: Registered udp transport > module. > RPC: Registered tcp transport > module. > ieee80211: 802.11 data/management/control stack, > git-1.1.13 > ieee80211:VFS: Mounted root (jffs2 > filesystem). > Freeing init memory: > 132K > Warning: unable to open an initial > console. > Failed to execute /init. Attempting > defaults... > Kernel panic - not syncing: No init found. Try passing init= option > to kernel. > > Can anyone help to solve this problem? > Thanks > > -- > unsubscribe: [email protected] > website: http://groups.google.com/group/android-porting > -- unsubscribe: [email protected] website: http://groups.google.com/group/android-porting
