This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Kernel Build / Diff between SDK and PSP configuration for AMSDK Linux

Other Parts Discussed in Thread: TPS65910, TPS65217

I'm using a BeagleBone board and I was trying to compile it's kernel to try the debug feature in CCSv5 but I'm stuck in making it run properly. I've downloaded the SDK ti-sdk-am335x-evm-05.05.00.00-Linux-x86-Install and the kernel in it is the linux-3.2.0-psp04.06.00.08.sdk. I used the following commands:

make tisdk_am335x-evm_defconfig

make menuconfig (to set the options for the debug - http://processors.wiki.ti.com/index.php/Linux_Debug_in_CCSv5)

The uImage generated didn't boot. Then I tryed am335x_evm_defconfig in the first step, but I got the same results.

On the console I got the following:

--------------------------------------------------------------------

## Booting kernel from Legacy Image at 80007fc0 ...
Image Name: Linux-3.2.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3200968 Bytes = 3.1 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
XIP Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[ 0.135986] tps65910 1-002d: could not be detected
[ 0.185882] Could not set LED4 to fully on
[ 0.309295] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 0.399200] smartreflex smartreflex: am33xx_sr_probe: Zero NValue read from EFUSE
[ 0.407897] sr_init: platform driver register failed
[ 0.549774] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
[ 0.558715] [<c0019094>] (unwind_backtrace+0x0/0x138) from [<c03f287c>] (panic+0x64/0x198)
[ 0.567504] [<c03f287c>] (panic+0x64/0x198) from [<c0592bc4>] (mount_block_root+0x17c/0x220)
[ 0.576416] [<c0592bc4>] (mount_block_root+0x17c/0x220) from [<c0592e24>] (mount_root+0xd0/0xd8)
[ 0.585662] [<c0592e24>] (mount_root+0xd0/0xd8) from [<c0592fbc>] (prepare_namespace+0x190/0x1cc)
[ 0.595031] [<c0592fbc>] (prepare_namespace+0x190/0x1cc) from [<c0592880>] (kernel_init+0x11c/0x128)
[ 0.604675] [<c0592880>] (kernel_init+0x11c/0x128) from [<c0014a00>] (kernel_thread_exit+0x0/0x8)

--------------------------------------------------------------------

So, my question is: what is the difference between SDK config and PSP config? Which one I should use/modify in order to make my kernel work and be debuglable?

Thanks for helping =)

  • Davi,

    It seems the problem is not with the kernel image but with the bootargs paramater value. The kernel is not able to find the rootfs and therefore it hangs during the kernel boot process.

    Please see http://processors.wiki.ti.com/index.php/AM335x_PSP_User%27s_Guide#Booting_Linux_Kernel for information about how to boot linux from different media.

    Regards,

    Carlos

  • Actually, first I thought it was booting when I used the following commands:

    U-Boot# setenv bootargs 'console=ttyO0,115200n8 root=/dev/mmcblk0p2 mem=128M rootwait'
    U-Boot# setenv bootcmd 'mmc rescan; fatload mmc 0 0x82000000 uImage; bootm 0x82000000'
    U-Boot# boot

    BUT the console is just showing a lot more information regarding the boot process. It stills doesn't find the rootfs and doesn't boot.

    Well, I will try to understand what's going on and post any news. Weird thing is that BeagleBone's uImage works just fine...

  • Are you sure you have non-corrupted rootfs in your SD card 2nd partition? Could you post the full boot log? Did you try the default uImage comes with the release?

    Regards,

    Yan

  • The default uImage works. The problem is with the one I build. I'm trying to update de arago gcc compiler, but I'm not very optimistic that this will solve my problem...

    Anyway, the full log:

    Uncompressing Linux... done, booting the kernel.
    [ 0.000000] Linux version 3.2.0 (davi@ubuntu) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #1 Mon Oct 1 22:05:35 BRT 2012
    [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [ 0.000000] Machine: am335xevm
    [ 0.000000] Memory policy: ECC disabled, Data cache writeback
    [ 0.000000] AM335X ES1.0 (sgx neon )
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
    [ 0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 mem=128M rootwait
    [ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
    [ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
    [ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
    [ 0.000000] Memory: 128MB = 128MB total
    [ 0.000000] Memory: 123308k/123308k available, 7764k reserved, 0K highmem
    [ 0.000000] Virtual kernel memory layout:
    [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    [ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
    [ 0.000000] vmalloc : 0xc8800000 - 0xff000000 ( 872 MB)
    [ 0.000000] lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
    [ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
    [ 0.000000] .text : 0xc0008000 - 0xc059d000 (5716 kB)
    [ 0.000000] .init : 0xc059d000 - 0xc05db000 ( 248 kB)
    [ 0.000000] .data : 0xc05dc000 - 0xc0644198 ( 417 kB)
    [ 0.000000] .bss : 0xc06441bc - 0xc0671024 ( 180 kB)
    [ 0.000000] NR_IRQS:396
    [ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [ 0.000000] Total of 128 interrupts on 1 active controller
    [ 0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
    [ 0.000000] OMAP clocksource: GPTIMER1 at 32768 Hz
    [ 0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
    [ 0.000000] Console: colour dummy device 80x30
    [ 0.000183] Calibrating delay loop... 498.89 BogoMIPS (lpj=2494464)
    [ 0.058166] pid_max: default: 32768 minimum: 301
    [ 0.058319] Security Framework initialized
    [ 0.058441] Mount-cache hash table entries: 512
    [ 0.058898] CPU: Testing write buffer coherency: ok
    [ 0.080230] omap_hwmod: pruss: failed to hardreset
    [ 0.081604] print_constraints: dummy:
    [ 0.082092] NET: Registered protocol family 16
    [ 0.084899] OMAP GPIO hardware version 0.1
    [ 0.088470] omap_mux_init: Add partition: #1: core, flags: 0
    [ 0.091400] omap_i2c.1: alias fck already exists
    [ 0.092590] omap2_mcspi.1: alias fck already exists
    [ 0.092895] omap2_mcspi.2: alias fck already exists
    [ 0.093841] edma.0: alias fck already exists
    [ 0.093872] edma.0: alias fck already exists
    [ 0.093902] edma.0: alias fck already exists
    [ 0.131439] bio: create slab <bio-0> at 0
    [ 0.134399] SCSI subsystem initialized
    [ 0.136566] usbcore: registered new interface driver usbfs
    [ 0.136962] usbcore: registered new interface driver hub
    [ 0.137237] usbcore: registered new device driver usb
    [ 0.137420] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
    [ 0.137786] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
    [ 0.158203] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
    [ 0.160156] tps65910 1-002d: could not be detected
    [ 0.161743] Advanced Linux Sound Architecture Driver Version 1.0.24.
    [ 0.163208] Switching to clocksource gp timer
    [ 0.184814] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
    [ 0.185058] musb-hdrc musb-hdrc.0: dma type: pio
    [ 0.185485] MUSB0 controller's USBSS revision = 4ea20800
    [ 0.186279] musb-hdrc musb-hdrc.0: USB OTG mode controller at c883c000 using PIO, IRQ 18
    [ 0.186492] musb-hdrc musb-hdrc.1: dma type: pio
    [ 0.186889] MUSB1 controller's USBSS revision = 4ea20800
    [ 0.187072] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [ 0.187164] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
    [ 0.187316] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [ 0.187347] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 0.187377] usb usb1: Product: MUSB HDRC host driver
    [ 0.187377] usb usb1: Manufacturer: Linux 3.2.0 musb-hcd
    [ 0.187408] usb usb1: SerialNumber: musb-hdrc.1
    [ 0.188476] hub 1-0:1.0: USB hub found
    [ 0.188507] hub 1-0:1.0: 1 port detected
    [ 0.189300] musb-hdrc musb-hdrc.1: USB Host mode controller at c883e800 using PIO, IRQ 19
    [ 0.189819] NET: Registered protocol family 2
    [ 0.190063] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.190460] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
    [ 0.190582] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    [ 0.190643] TCP: Hash tables configured (established 4096 bind 4096)
    [ 0.190673] TCP reno registered
    [ 0.190704] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.190734] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.190948] NET: Registered protocol family 1
    [ 0.191284] RPC: Registered named UNIX socket transport module.
    [ 0.191314] RPC: Registered udp transport module.
    [ 0.191314] RPC: Registered tcp transport module.
    [ 0.191345] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 0.191619] NetWinder Floating Point Emulator V0.97 (double precision)
    [ 0.200561] VFS: Disk quotas dquot_6.5.2
    [ 0.200653] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [ 0.201354] msgmni has been set to 240
    [ 0.205566] alg: No test for stdrng (krng)
    [ 0.206390] io scheduler noop registered
    [ 0.206420] io scheduler deadline registered
    [ 0.206512] io scheduler cfq registered (default)
    [ 0.207977] Could not set LED4 to fully on
    [ 0.210113] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
    [ 0.760253] console [ttyO0] enabled
    [ 0.764709] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
    [ 0.772705] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
    [ 0.780731] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
    [ 0.788726] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
    [ 0.796691] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
    [ 0.817504] brd: module loaded
    [ 0.827636] loop: module loaded
    [ 0.831176] i2c-core: driver [tsl2550] using legacy suspend method
    [ 0.837738] i2c-core: driver [tsl2550] using legacy resume method
    [ 0.844238] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
    [ 0.903778] No daughter card found
    [ 0.907409] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
    [ 0.922698] Board name: A335BONE
    [ 0.926086] Board version: 00A5
    [ 0.929412] The board is a AM335x Beaglebone.
    [ 0.934936] tps65217 1-0024: TPS65217 ID 0xf version 1.1
    [ 0.942840] print_constraints: DCDC1: 900 <--> 1800 mV at 1800 mV
    [ 0.951721] print_constraints: DCDC2: 900 <--> 3300 mV at 1275 mV
    [ 0.960540] print_constraints: DCDC3: 900 <--> 1500 mV at 1100 mV
    [ 0.969360] print_constraints: LDO1: 1000 <--> 3300 mV at 1800 mV
    [ 0.978179] print_constraints: LDO2: 900 <--> 3300 mV at 3300 mV
    [ 0.986877] print_constraints: LDO3: 1800 <--> 3300 mV at 3300 mV
    [ 0.995727] print_constraints: LDO4: 1800 <--> 3300 mV at 3300 mV
    [ 1.002777] Maximum current provided by the USB port is 500mA which is not sufficient
    [ 1.002777] when operating @OPP120 and OPPTURBO. The current requirement for some
    [ 1.002807] use-cases using OPP100 might also exceed the maximum current that the
    [ 1.002807] USB port can provide. Unless you are fully confident that the current
    [ 1.002807] requirements for OPP100 use-case don't exceed the USB limits, switching
    [ 1.002838] to AC power is recommended.
    [ 1.047271] omap_hsmmc.0: alias fck already exists
    [ 1.052947] omap_i2c.3: alias fck already exists
    [ 1.073883] omap_i2c omap_i2c.3: bus 3 rev2.4.0 at 100 kHz
    [ 1.081268] registered am33xx_sr device
    [ 1.087493] mtdoops: mtd device (mtddev=name/number) must be supplied
    [ 1.094879] omap2-nand driver initializing
    [ 1.099395] OneNAND driver initializing
    [ 1.105194] CAN device driver interface
    [ 1.109222] CAN bus driver for Bosch D_CAN controller 1.0
    [ 1.163848] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
    [ 1.170379] davinci_mdio davinci_mdio.0: detected phy mask fffffffe
    [ 1.177795] davinci_mdio.0: probed
    [ 1.181365] davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver SMSC LAN8710/LAN8720
    [ 1.190368] usbcore: registered new interface driver zd1201
    [ 1.196472] usbcore: registered new interface driver cdc_ether
    [ 1.202789] usbcore: registered new interface driver cdc_eem
    [ 1.208923] usbcore: registered new interface driver dm9601
    [ 1.214813] cdc_ncm: 04-Aug-2011
    [ 1.218414] usbcore: registered new interface driver cdc_ncm
    [ 1.224365] Initializing USB Mass Storage driver...
    [ 1.229766] usbcore: registered new interface driver usb-storage
    [ 1.236053] USB Mass Storage support registered.
    [ 1.241516] mousedev: PS/2 mouse device common for all mice
    [ 1.248748] omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
    [ 1.255523] omap_rtc: already running
    [ 1.259613] i2c /dev entries driver
    [ 1.264160] Linux video capture interface: v2.00
    [ 1.269439] usbcore: registered new interface driver uvcvideo
    [ 1.275512] USB Video Class driver (1.1.1)
    [ 1.283172] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [ 1.291259] cpuidle: using governor ladder
    [ 1.296325] cpuidle: using governor menu
    [ 1.303131] omap4_aes_mod_init: loading AM33X AES driver
    [ 1.308929] omap4-aes omap4-aes: AM33X AES hw accel rev: 3.02
    [ 1.315887] omap4_aes_probe: probe() done
    [ 1.320404] omap4_sham_mod_init: loading AM33X SHA/MD5 driver
    [ 1.326629] omap4-sham omap4-sham: AM33X SHA/MD5 hw accel rev: 4.03
    [ 1.346618] omap4_sham_probe: probe() done
    [ 1.354309] usbcore: registered new interface driver usbhid
    [ 1.360168] usbhid: USB HID core driver
    [ 1.365112] usbcore: registered new interface driver snd-usb-audio
    [ 1.373931] ALSA device list:
    [ 1.377075] No soundcards found.
    [ 1.380645] oprofile: hardware counters not available
    [ 1.385986] oprofile: using timer interrupt.
    [ 1.390502] nf_conntrack version 0.5.0 (1926 buckets, 7704 max)
    [ 1.397338] ip_tables: (C) 2000-2006 Netfilter Core Team
    [ 1.403076] TCP cubic registered
    [ 1.406494] NET: Registered protocol family 17
    [ 1.411193] can: controller area network core (rev 20090105 abi 8)
    [ 1.417816] NET: Registered protocol family 29
    [ 1.422515] can: raw protocol (rev 20090105)
    [ 1.427001] can: broadcast manager protocol (rev 20090105 t)
    [ 1.433013] Registering the dns_resolver key type
    [ 1.438079] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [ 1.446166] ThumbEE CPU extension supported.
    [ 1.450714] mux: Failed to setup hwmod io irq -22
    [ 1.456451] Power Management for AM33XX family
    [ 1.461395] Trying to load am335x-pm-firmware.bin (60 secs timeout)
    [ 1.468139] Copied the M3 firmware to UMEM
    [ 1.472625] smartreflex smartreflex: am33xx_sr_probe: Zero NValue read from EFUSE
    [ 1.480560] smartreflex: probe of smartreflex failed with error -22
    [ 1.487884] sr_init: platform driver register failed
    [ 1.497558] clock: disabling unused clocks to save power
    [ 1.518249] mmc0: host does not support reading read-only switch. assuming write-enable.
    [ 1.529388] mmc0: new high speed SDHC card at address 1234
    [ 1.536010] Detected MACID=50:56:63:c7:69:c
    [ 1.541961] cpsw: Detected MACID = 50:56:63:c7:69:0d
    [ 1.547790] mmcblk0: mmc0:1234 SA04G 3.63 GiB
    [ 1.554565] omap_rtc omap_rtc: setting system clock to 2000-01-01 00:05:10 UTC (946685110)
    [ 1.563964] mmcblk0: p1 p2
    [ 1.571197] EXT3-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (40)
    [ 1.583282] EXT2-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (44)
    [ 1.603027] List of all partitions:
    [ 1.606781] b300 3813376 mmcblk0 driver: mmcblk
    [ 1.612365] b301 72261 mmcblk0p1 00000000-0000-0000-0000-000000000mmcblk0p1
    [ 1.620819] b302 3494137 mmcblk0p2 00000000-0000-0000-0000-000000000mmcblk0p2
    [ 1.629272] No filesystem could mount root, tried: ext3 ext2 cramfs vfat msdos
    [ 1.636993] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
    [ 1.645904] Backtrace:
    [ 1.648498] [<c0017978>] (dump_backtrace+0x0/0x110) from [<c0422338>] (dump_stack+0x18/0x1c)
    [ 1.657379] r6:c792001c r5:c05cc1fc r4:c06451c8 r3:c05fe6c8
    [ 1.663391] [<c0422320>] (dump_stack+0x0/0x1c) from [<c04223a8>] (panic+0x6c/0x1a0)
    [ 1.671478] [<c042233c>] (panic+0x0/0x1a0) from [<c059dd3c>] (mount_block_root+0x20c/0x228)
    [ 1.680267] r3:c781df2c r2:c781df58 r1:c781df58 r0:c04fe660
    [ 1.686248] r7:00008000
    [ 1.688934] [<c059db30>] (mount_block_root+0x0/0x228) from [<c059df1c>] (mount_root+0xd8/0xe0)
    [ 1.698028] [<c059de44>] (mount_root+0x0/0xe0) from [<c059e0bc>] (prepare_namespace+0x198/0x1d4)
    [ 1.707275] r4:c0644220
    [ 1.709960] [<c059df24>] (prepare_namespace+0x0/0x1d4) from [<c059d90c>] (kernel_init+0x124/0x130)
    [ 1.719390] r5:c05da440 r4:c05da440
    [ 1.723175] [<c059d7e8>] (kernel_init+0x0/0x130) from [<c0041390>] (do_exit+0x0/0x67c)
    [ 1.731536] r5:c059d7e8 r4:00000000

  • Oh, and the uImage that works is the one that was in the SD with the BeagleBone. I'm re-downloading the release just in case, I can try the uImage that comes with it and it finishes (http://goo.gl/J87wl)

  • When you try default uImage, could you just replace the current one in your sd card with the default one from the release? So the only variable is uImage.

    BTW, what is the fs_type of your SD card 2nd partition (mmcblk0p2)?

    Regards,

    Yan

  • I don't really know how to get this information...

    My windows says that the file system of the SD is FAT, does that answer your question?

    I tryed to go to u-boot and see if there was any command to show that, but when I type mmcinfo, none of the information is about the file system and I can't see which other command would display such thing.

    Another thing, I replaced the uImage with the one from the release and it did not work either (the same "kernel panic" message pops up). For now the only one that does work is the one provided by BeagleBoard.org, so I'm thinking of loading the u-boot from the release and see if that has anything to do with this issue.

  • I found this:

    http://processors.wiki.ti.com/index.php/AM335x_U-Boot_User%27s_Guide#Setting_Up_Boot_Environment_on_SD_Card

    Maybe that's the reason of all my problems, since I was just replacing the uImage file in the SD Card...

  • It looks like your SD card wasn't created properly. After you populated uboot/uimage/rootfs into your SD card, try it using default uImage first to see if it is ok, then try your own uImage.

    Regards,

    Yan

  • Where do I get this nfs.tar.gz file? Is it generated in the build?

    I need it in order to run the script mksd-am335x.sh...

    I tryed to find it (find ./ -name "*nfs*" -print) and it isn't there.

    Do I make this file or is there somewhere to download it?

    BTW, thanks for the support so far!

  • If you've installed SDK ti-sdk-am335x-evm-05.05.00.00-Linux-x86-Install in your linux host, you should have the script to make sd card and target NFS tar ball. The script is called "create-sdcard.sh" and it is under '<sdk-root>/bin'. See below wiki about this script. The NFS tar ball is under '<sdk-root>/filesystem'.

    http://processors.wiki.ti.com/index.php/Sitara_Linux_SDK_create_SD_card_script

    Regards,

    Yan

  • Finally!

    Everything works now. Looks like my SD Card was the problem all along...

    Best regatds =]