Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12590 Discussions

Stuck at "Starting Kernel..."

Altera_Forum
Honored Contributor II
3,440 Views

Hey, 

 

I am trying to get a modified version of the GHRD-HPS running on my Arrow sockit board. 

Here is my setup: 

 

 

This is the output i get, has anyone an idea what could be my problem or how i could debug the problem? 

 

U-Boot SPL 2013.01.01 (May 04 2016 - 00:41:22) BOARD : Altera SOCFPGA Cyclone V Board CLOCK: EOSC1 clock 25000 KHz CLOCK: EOSC2 clock 25000 KHz CLOCK: F2S_SDR_REF clock 0 KHz CLOCK: F2S_PER_REF clock 0 KHz CLOCK: MPU clock 800 MHz CLOCK: DDR clock 400 MHz CLOCK: UART clock 100000 KHz CLOCK: MMC clock 50000 KHz CLOCK: QSPI clock 400000 KHz RESET: COLD INFO : Watchdog enabled SDRAM: Initializing MMR registers SDRAM: Calibrating PHY SEQ.C: Preparing to start memory calibration SEQ.C: CALIBRATION PASSED SDRAM: 1024 MiB ALTERA DWMMC: 0 reading u-boot.img reading u-boot.img U-Boot 2013.01.01 (May 03 2016 - 18:49:51) CPU : Altera SOCFPGA Platform BOARD : Altera SOCFPGA Cyclone V Board I2C: ready DRAM: 1 GiB MMC: ALTERA DWMMC: 0 *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Skipped ethaddr assignment due to invalid EMAC address in EEPROM Net: mii0 Warning: failed to set MAC address Hit any key to stop autoboot: 0 reading u-boot.scr 254 bytes read in 3 ms (82 KiB/s)# # Executing script at 02000000 reading output_files/RGBPatternGen.rbf 2762608 bytes read in 133 ms (19.8 MiB/s)# # Starting application at 0x3FF79544 ...# # Application terminated, rc = 0x0 reading zImage 3465776 bytes read in 161 ms (20.5 MiB/s) reading PatternGenSystem.dtb 23293 bytes read in 7 ms (3.2 MiB/s)# # Flattened Device Tree blob at 00000100 Booting using the fdt blob at 0x00000100 Loading Device Tree to 03ff7000, end 03fffafc ... OK Starting kernel ...
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
1,750 Views

I managed to get a bit further by changing the order of the sopc2dts --board options ( first hps_common_board_info.xml and then the sockit info) 

 

However linux is still not really booting correctly :( 

 

lcd_load_custom_fonts: i2c_master_send returns -121 lcd_cmd_no_params: i2c_master_send returns -121 lcd_cmd_one_param: i2c_master_send returns -121 lcd_cmd_no_params: i2c_master_send returns -121 lcd-comm 0-0028: LCD driver initialized ... ------------------------ WARNING: at fs/sysfs/dir.c:530 sysfs_add_one+0xac/0xbc() sysfs: cannot create duplicate filename '/class/spi_master/spi0' Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.31-ltsi-05151-gc8b20a4# 1 (unwind_backtrace+0x0/0xf8) from (show_stack+0x20/0x24) (show_stack+0x20/0x24) from (dump_stack+0x24/0x28) (dump_stack+0x24/0x28) from (warn_slowpath_common+0x64/0x7c) (warn_slowpath_common+0x64/0x7c) from (warn_slowpath_fmt+0x40/0x48) (warn_slowpath_fmt+0x40/0x48) from (sysfs_add_one+0xac/0xbc) (sysfs_add_one+0xac/0xbc) from (sysfs_do_create_link_sd+0x10c/0x21c) (sysfs_do_create_link_sd+0x10c/0x21c) from (sysfs_create_link+0x30/0x48) (sysfs_create_link+0x30/0x48) from (device_add+0x300/0x5d4) (device_add+0x300/0x5d4) from (spi_register_master+0x150/0x5d4) (spi_register_master+0x150/0x5d4) from (dw_spi_add_host+0x254/0x314) (dw_spi_add_host+0x254/0x314) from (dw_spi_mmio_probe+0x268/0x29c) (dw_spi_mmio_probe+0x268/0x29c) from (platform_drv_probe+0x28/0x2c) (platform_drv_probe+0x28/0x2c) from (really_probe+0x78/0x218) (really_probe+0x78/0x218) from (__driver_attach+0xa8/0xac) (__driver_attach+0xa8/0xac) from (bus_for_each_dev+0x7c/0xb0) (bus_for_each_dev+0x7c/0xb0) from (driver_attach+0x2c/0x30) (driver_attach+0x2c/0x30) from (bus_add_driver+0x1d4/0x260) (bus_add_driver+0x1d4/0x260) from (driver_register+0x88/0x150) (driver_register+0x88/0x150) from (platform_driver_register+0x60/0x68) (platform_driver_register+0x60/0x68) from (dw_spi_mmio_driver_init+0x18/0x1c) (dw_spi_mmio_driver_init+0x18/0x1c) from (do_one_initcall+0x114/0x174) (do_one_initcall+0x114/0x174) from (kernel_init_freeable+0x1ac/0x250) (kernel_init_freeable+0x1ac/0x250) from (kernel_init+0x1c/0x164) (kernel_init+0x1c/0x164) from (ret_from_fork+0x14/0x20) ------ spi_master spi0: problem registering spi master ------------------------ WARNING: at kernel/irq/manage.c:1249 __free_irq+0xb0/0x1d0() Trying to free already-free IRQ 187 Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 3.10.31-ltsi-05151-gc8b20a4# 1 (unwind_backtrace+0x0/0xf8) from (show_stack+0x20/0x24) (show_stack+0x20/0x24) from (dump_stack+0x24/0x28) (dump_stack+0x24/0x28) from (warn_slowpath_common+0x64/0x7c) (warn_slowpath_common+0x64/0x7c) from (warn_slowpath_fmt+0x40/0x48) (warn_slowpath_fmt+0x40/0x48) from (__free_irq+0xb0/0x1d0) (__free_irq+0xb0/0x1d0) from (free_irq+0x5c/0xb4) (free_irq+0x5c/0xb4) from (dw_spi_mmio_probe+0x160/0x29c) (dw_spi_mmio_probe+0x160/0x29c) from (platform_drv_probe+0x28/0x2c) (platform_drv_probe+0x28/0x2c) from (really_probe+0x78/0x218) (really_probe+0x78/0x218) from (__driver_attach+0xa8/0xac) (__driver_attach+0xa8/0xac) from (bus_for_each_dev+0x7c/0xb0) (bus_for_each_dev+0x7c/0xb0) from (driver_attach+0x2c/0x30) (driver_attach+0x2c/0x30) from (bus_add_driver+0x1d4/0x260) (bus_add_driver+0x1d4/0x260) from (driver_register+0x88/0x150) (driver_register+0x88/0x150) from (platform_driver_register+0x60/0x68) (platform_driver_register+0x60/0x68) from (dw_spi_mmio_driver_init+0x18/0x1c) (dw_spi_mmio_driver_init+0x18/0x1c) from (do_one_initcall+0x114/0x174) (do_one_initcall+0x114/0x174) from (kernel_init_freeable+0x1ac/0x250) (kernel_init_freeable+0x1ac/0x250) from (kernel_init+0x1c/0x164) (kernel_init+0x1c/0x164) from (ret_from_fork+0x14/0x20) ------ dw_spi_mmio: probe of fff01000.spi failed with error -17 ... rtc-ds1307: probe of 0-0068 failed with error -5 i2c /dev entries driver dw_wdt: probe of ffd03000.timer failed with error -16 Synopsys Designware Multimedia Card Interface Driver dwmmc_socfpga ff704000.flash: Using internal DMA controller. dwmmc_socfpga ff704000.flash: Version ID is 240a dwmmc_socfpga ff704000.flash: DW MMC controller at irq 171, 32 bit host data width, 1024 deep fifo mmc_host mmc0: Bus speed (slot 0) = 50000000Hz (slot req 400000Hz, actual 396825HZ div = 63) dwmmc_socfpga ff704000.flash: 1 slots initialized platform leds.1: Driver leds-gpio requests probe deferral ledtrig-cpu: registered to indicate activity on CPUs usbcore: registered new interface driver usbhid usbhid: USB HID core driver oprofile: using arm/armv7-ca9 ... EXT3-fs (mmcblk0p2): using internal journal EXT3-fs (mmcblk0p2): recovery complete EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode VFS: Mounted root (ext3 filesystem) on device 179:2. devtmpfs: mounted Freeing unused kernel memory: 332K (8067c000 - 806cf000) Mount failed for selinuxfs on /sys/fs/selinux: No such file or directory Unable to handle kernel paging request at virtual address c08d600c pgd = 80004000 *pgd=3f816811, *pte=00000000, *ppte=00000000 Internal error: Oops: 807 SMP ARM Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 3.10.31-ltsi-05151-gc8b20a4# 1 task: 806db8c0 ti: 806d0000 task.ti: 806d0000 PC is at dw_wdt_ping+0x74/0xa0 LR is at l2x0_cache_sync+0x50/0x54 pc : lr : psr: 600d0113 sp : 806d1dc0 ip : 806d1da8 fp : 806d1dd4 r10: 00000000 r9 : 8070b028 r8 : 803819ec r7 : 00000100 r6 : 806d0018 r5 : 806d20c0 r4 : 807407e4 r3 : c08d6000 r2 : 00000076 r1 : a00d0113 r0 : 8070ce04 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel Control: 10c5387d Table: 3fb8004a DAC: 00000015 Process swapper/0 (pid: 0, stack limit = 0x806d0240) Stack: (0x806d1dc0 to 0x806d2000) 1dc0: 80712240 807407f8 806d1e0c 806d1dd8 800320cc 803819f8 9f24f780 00000000 1de0: 80f5c648 80712240 807407f8 806d2084 00000000 806d1e20 803819ec 00000000 1e00: 806d1e54 806d1e10 80033598 80032088 80712a54 806d20c0 00200200 8070b028 1e20: 806d1e20 806d1e20 806cd568 00000001 00000001 806d2084 00000004 806d83e8 1e40: 00000100 806d0018 806d1ebc 806d1e58 8002be68 800333c0 9e8c665a 00000000 1e60: 9e8c665a 00200000 8070ae52 806d20c0 ffff8bdb 806ddbec 0000000a 80712080 1e80: 806cd6e0 00000000 00000004 8070afc4 80014d88 600d0193 0000001d 00000000 1ea0: fee00100 806d83e8 806d843c 00000000 806d1ed4 806d1ec0 8002c098 8002bd48 1ec0: 806ced9c 0000001d 806d1eec 806d1ed8 8002c320 8002c044 806ced9c 0000001d 1ee0: 806d1f0c 806d1ef0 8000f660 8002c2c0 fee0010c 806d8e70 806d1f30 fee00100 1f00: 806d1f2c 806d1f10 80008564 8000f618 8000fa80 600d0013 ffffffff 806d1f64 1f20: 806d1f84 806d1f30 8000e280 80008534 80f5c7f8 00000000 00000966 00000000 1f40: 806d0000 806d0008 806d0000 8070b410 806d83e8 806d843c 00000000 806d1f84 1f60: 806d1f88 806d1f78 8000fa7c 8000fa80 600d0013 ffffffff 806d1fa4 806d1f88 1f80: 80060b14 8000fa50 8070ae36 804c9ee0 804c62c0 806b3cf0 806d1fb4 806d1fa8 1fa0: 804bd1b0 800609d8 806d1ff4 806d1fb8 8067cab4 804bd138 ffffffff ffffffff 1fc0: 8067c5a0 00000000 00000000 806b3cf0 10c5387d 806d83b4 806b3cec 806dc6d4 1fe0: 0000406a 413fc090 00000000 806d1ff8 00008074 8067c80c 00000000 00000000 (dw_wdt_ping+0x74/0xa0) from (call_timer_fn+0x50/0x120) (call_timer_fn+0x50/0x120) from (run_timer_softirq+0x1e4/0x298) (run_timer_softirq+0x1e4/0x298) from (__do_softirq+0x12c/0x290) (__do_softirq+0x12c/0x290) from (do_softirq+0x60/0x68) (do_softirq+0x60/0x68) from (irq_exit+0x6c/0xa4) (irq_exit+0x6c/0xa4) from (handle_IRQ+0x54/0xa0) (handle_IRQ+0x54/0xa0) from (gic_handle_irq+0x3c/0x6c) (gic_handle_irq+0x3c/0x6c) from (__irq_svc+0x40/0x50) Exception stack(0x806d1f30 to 0x806d1f78) 1f20: 80f5c7f8 00000000 00000966 00000000 1f40: 806d0000 806d0008 806d0000 8070b410 806d83e8 806d843c 00000000 806d1f84 1f60: 806d1f88 806d1f78 8000fa7c 8000fa80 600d0013 ffffffff (__irq_svc+0x40/0x50) from (arch_cpu_idle+0x3c/0x40) (arch_cpu_idle+0x3c/0x40) from (cpu_startup_entry+0x148/0x218) (cpu_startup_entry+0x148/0x218) from (rest_init+0x84/0x88) (rest_init+0x84/0x88) from (start_kernel+0x2b4/0x2c0) Code: 0a000000 e12fff33 e5943004 e3a02076 (e583200c) ------
0 Kudos
Altera_Forum
Honored Contributor II
1,750 Views

I had exactly the same problem a few weeks ago, apparently the provided .xml contained errors. 

Look in hps_common_board_info.xml and replace all DTappend by DTAppend 

In soc_system_board_info.xml, remove the > at line 22. 

 

Personally I created the .dtb with sopc2dts in command lines with cygdrive env.
0 Kudos
Altera_Forum
Honored Contributor II
1,750 Views

Thanks for the tip, however the DTappend was already correct for my version. 

Could you tell me in which order you passed the .xml files to sopc2dts? 

I am not sure if i am doing it correct.
0 Kudos
Altera_Forum
Honored Contributor II
1,750 Views

I follow the tutorial at : https://rocketboards.org/foswiki/view/documentation/gsrd140devicetreegenerator 

Under cygwin environment :  

 

$ sopc2dts --input soc_system.sopcinfo 

--output socfpga.dtb 

--type dtb 

--board soc_system_board_info.xml 

--board hps_common_board_info.xml 

--bridge-removal all 

--clocks
0 Kudos
Altera_Forum
Honored Contributor II
1,750 Views

I ran into a similar problem and I ended up taking the angstrom-socfpga (Yocto) release, built the entire image and then started tinkering with the device tree. I never had much luck in porting the Qsys tree to DTB, especially with custom logic attached to the HPS. For me taking the home-build standard using cyclone5-defconfig, or something like that, and modify it to fit your new design works best. I remember having problems with Watchdog timers that where put in the device tree by the sopc2dts tool but were actually lacking in h/w causing trace dumps just like yours.

0 Kudos
Reply