Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: Adraen on February 24, 2014, 07:16:02 AM

Title: PiCore TFTP Boot
Post by: Adraen on February 24, 2014, 07:16:02 AM
Hi,

I've been struggling quite a bit to TFTP boot PiCore on the Raspberry Pi and just wanted to know if anyone got it working or has any idea what i'm doing wrong :).

So I prepared an SDcard with u-boot in as the boot img

My boot script looks like this

Code: [Select]
setenv kernel_addr_r 0x8000
setenv ramfsfile initrd.rpi
setenv ramfsaddr 0x00a00000
tftpboot ${kernel_addr_r} uImage
tftpboot ${ramfsaddr} ${ramfsfile}
setenv bootargs 'dwc_otg.lpm_enable=0 earlyprintk console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 initrd=0x00a00000,3578819 root=/dev/ram0 elevator=deadline nortc loglevel=3 waitusb=5'
bootm ${kernel_addr_r} ${ramfsaddr}

So what I've done is get the kernel and initrd from the img file provided in the download sections

Encapsulated the uImage and initrd in format uboot can work with

Code: [Select]
mkimage -A arm -O linux -T linux -a 8000 -e 8000 -C none -d kernel.img uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x0 -e 0x0 -n initrd -d initrd.gz initrd.rpi

But as you can imagine it doesnt work :/, it either hangs at 'Starting Kernel ...' or when I play a bit with the addresses -0x20 (looks like that's the size of uboot headers, not to sure about this)

Code: [Select]
## Booting kernel from Legacy Image at 00007fe0 ...
   Image Name:
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    7007284 Bytes = 6.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 009fffe0 ...
   Image Name:   initrd
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    3578819 Bytes = 3.4 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

[    3.243313] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
[    3.251783] CPU: 0 PID: 1 Comm: swapper Tainted: G        W    3.13.3-piCore+ #1
[    3.259385] [<c00147dc>] (unwind_backtrace+0x0/0xec) from [<c0011ae8>] (show_stack+0x10/0x14)
[    3.268118] [<c0011ae8>] (show_stack+0x10/0x14) from [<c04b12b8>] (panic+0x94/0x1d8)
[    3.276048] [<c04b12b8>] (panic+0x94/0x1d8) from [<c064e034>] (mount_block_root+0x234/0x294)
[    3.284678] [<c064e034>] (mount_block_root+0x234/0x294) from [<c064e2a0>] (mount_root+0xe8/0x110)
[    3.293749] [<c064e2a0>] (mount_root+0xe8/0x110) from [<c064e42c>] (prepare_namespace+0x164/0x1c4)
[    3.302919] [<c064e42c>] (prepare_namespace+0x164/0x1c4) from [<c064dc20>] (kernel_init_freeable+0x16c/0x1b0)
[    3.313070] [<c064dc20>] (kernel_init_freeable+0x16c/0x1b0) from [<c04b0968>] (kernel_init+0x8/0x118)
[    3.322522] [<c04b0968>] (kernel_init+0x8/0x118) from [<c000e298>] (ret_from_fork+0x14/0x3c)
PANIC: VFS: Unable to mount root fs on unknown-block(1,0)

Entering kdb (current=0xcb832c80, pid 1) due to Keyboard Entry

Thanks !
Simon