1

I am trying to roll my own image for the raspberry Pi, I am using a B+ model Pi.

What I want to do is build my own kernel and for now have it load busybox or something similar, but I seem to be running into boot issues.

The kernel source that I am using is the latest from:

https://github.com/raspberrypi/linux

To build the kernel (On Ubuntu 14.04) I issue the following commend:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- bcmrpi-defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-

Now that my kernel is built I copy zImage to the /boot (FAT32) partition of my SD card which contains the following files that I retrieved from the Raspberry Pi firmware github

bootcode.bin,start.elf,config.txt,fixup_cd.dat,fixup.dat,fixup_x.dat

I have config.txt point to my zImage file, and this is what I see on boot!

    Kernel image @ 0x008000 [ 0x000000 - 0x313428 ]


    Starting kernel ...


    Uncompressing Linux...
    done, booting the kernel.

    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Initializing cgroup subsys cpu
    [    0.000000] Initializing cgroup subsys cpuacct
    [    0.000000] Linux version 3.12.35+ (bubo@bubo-desktop) (gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1) ) #3 PREEMPT Thu Jan 22 22:56:52 EST 2015
    [    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7),      cr=00c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
    [    0.000000] Machine: BCM2708
    [    0.000000] cma: CMA: reserved 8 MiB at 07800000
    [    0.000000] Memory policy: ECC disabled, Data cache writeback
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
    [    0.000000] Kernel command line: earlyprintk console=ttyAMA0 console=tty1 root=/dev/nfs rw nfsroot=192.168.1.4:/var/nfs/_install
    [    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: 114768K/131072K available (4429K kernel code, 243K rwdata, 1352K rodata, 144K init, 702K bss, 16304K reserved)
    [    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 - 0xc05ad830   (5783 kB)
    [    0.000000]       .init : 0xc05ae000 - 0xc05d2094   ( 145 kB)
    [    0.000000]       .data : 0xc05d4000 - 0xc0610de0   ( 244 kB)
    [    0.000000]        .bss : 0xc0610dec - 0xc06c0618   ( 703 kB)
    [    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000] NR_IRQS:394
    [    0.000000] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 4294967ms
    [    0.000000] Switching to timer-based delay loop
    [    0.000000] Console: colour dummy device 80x30
    [    0.000000] console [tty1] enabled
    [    0.001195] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=10000)
    [    0.001260] pid_max: default: 32768 minimum: 301
    [    0.001747] Mount-cache hash table entries: 512
    [    0.002612] Initializing cgroup subsys memory
    [    0.002726] Initializing cgroup subsys devices
    [    0.002766] Initializing cgroup subsys freezer
    [    0.002799] Initializing cgroup subsys blkio
    [    0.002947] CPU: Testing write buffer coherency: ok
    [    0.003409] Setting up static identity map for 0xc0434920 - 0xc043497c
    [    0.005285] devtmpfs: initialized
    [    0.021605] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
    [    0.023215] NET: Registered protocol family 16
    [    0.028412] DMA: preallocated 4096 KiB pool for atomic coherent allocations
    [    0.029077] cpuidle: using governor ladder
    [    0.029129] cpuidle: using governor menu
    [    0.029406] bcm2708.uart_clock = 0
    [    0.031418] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
[    0.031477] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.031517] mailbox: Broadcom VideoCore Mailbox driver
[    0.031618] bcm2708_vcio: mailbox at f200b880
[    0.031729] bcm_power: Broadcom power driver
[    0.031770] bcm_power_open() -> 0
[    0.031796] bcm_power_request(0, 8)
[    0.532089] bcm_mailbox_read -> 00000080, 0
[    0.532132] bcm_power_request -> 0
[    0.532367] Serial: AMBA PL011 UART driver
[    0.532538] dev:f1: ttyAMA0 at MMIO 0x20201000 (irq = 83, base_baud = 0) is a PL011 rev3
[    0.863136] console [ttyAMA0] enabled
[    0.889600] bio: create slab <bio-0> at 0
[    0.895098] SCSI subsystem initialized
[    0.899085] usbcore: registered new interface driver usbfs
[    0.904785] usbcore: registered new interface driver hub
[    0.910345] usbcore: registered new device driver usb
[    0.916787] Switched to clocksource stc
[    0.921044] FS-Cache: Loaded
[    0.924224] CacheFiles: Loaded
[    0.939996] NET: Registered pr
otocol family 2
[    0.945922] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.953168] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.959606] TCP: Hash tables configured (established 1024 bind 1024)
[    0.966059] TCP: reno registered
[    0.969357] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.975237] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.982005] NET: Registered protocol family 1
[    0.987008] RPC: Registered named UNIX socket transport module.
[    0.992967] RPC: Registered udp transport module.
[    0.997770] RPC: Registered tcp transport module.
[    1.002495] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.009711] bcm2708_dma: DMA manager at f2007000
[    1.014477] bcm2708_gpio: bcm2708_gpio_probe c05e1f10
[    1.020057] vc-mem: phys_addr:0x00000000 mem_base=0x00000000 mem_size:0x00000000(0 MiB)
[    1.029466] audit: initializing netlink socket (disabled)
[    1.034969] type=2000 audit(0.910:1): initialized

[    1.202823] VFS: Disk quotas dquot_6.5.2
[    1.207226] 
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.216077] FS-Cache: Netfs 'nfs' registered for caching
[    1.223025] NFS: Registering the id_resolver key type
[    1.228319] Key type id_resolver registered
[    1.232530] Key type id_legacy registered
[    1.237377] msgmni has been set to 240
[    1.243120] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    1.250975] io scheduler noop registered
[    1.254932] io scheduler deadline registered
[    1.259688] io scheduler cfq registered (default)
[    1.265630] BCM2708FB: allocated DMA memory 47c00000
[    1.270814] BCM2708FB: allocated DMA channel 4 @ f2007400
[    1.325305] Console: switching to colour frame buffer device 100x30
[    1.349984] bcm2708-dmaengine bcm2708-dmaengine: Load BCM2835 DMA engine driver
[    1.359395] uart-pl011 dev:f1: no DMA platform data
[    1.366632] vc-cma: Videocore CMA driver
[    1.372343] vc-cma: vc_cma_base      = 0x00000000
[    1.378797] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)
[    1.385844] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[    1.402238] brd: module loaded
[    1.412131] loop: module loaded
[    1.417275] vchiq: vchiq_init_state: slot_zero = 0xc7800000, is_master = 0
[    1.426736] Loading iSCSI transport class v2.0-870.
[    1.434525] usbcore: registered new interface driver smsc95xx
[    1.442370] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)

[    1.650032] Core Release: 2.80a
[    1.654761] Setting d
efault values for core params
[    1.661187] Finished setting default values for core params

[    1.868426] Using Buffer DMA mode
[    1.873348] Periodi
c Transfer Interrupt Enhancement - disabled
[    1.880777] Multiprocessor Interrupt Enhancement - disabled
[    1.887989] OTG VER PARAM: 0, OTG VER FLAG: 0
[    1.893888] Dedicated Tx FIFOs mode
[    1.899280] WARN::dwc_otg_hcd_init:1042: FIQ DMA bounce buffers: virt = 0xc7c14000 dma = 0x47c14000 len=9024
[    1.912491] FIQ FSM acceleration enabled for :
[    1.912491] Non-periodic Split Transactions
[    1.912491] Periodic Split Transactions
[    1.912491] High-Speed Isochronous Endpoints
[    1.935763] WARN::hcd_init:473: FIQ at 0xc0312c80
[    1.942140] WARN::hcd_init:474: FIQ ASM at 0xc0312f08 length 36
[    1.949724] WARN::hcd_init:500: MPHI regs_base at 0xc8806000
[    1.957070] dwc_otg bcm2708_usb: DWC OTG Controller
[    1.963672] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1
[    1.972688] dwc_otg bcm2708_usb: irq 32, io mem 0x00000000
[    1.979944] Init: Port Power? op_state=1
[    1.985525] Init: Power Port (0)
[    1.990668] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.999198] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.008127] usb usb1: Product: DWC OTG Controller
[    2.014472] usb usb1: Manufacturer: Linux 3.12.35+ dwc_otg_hcd
[    2.021990] usb usb1: SerialNumber: bcm2708_usb
[    2.029022] hub 1-0:1.0: USB hub found
[    2.034507] hub 1-0:1.0: 1 port detected
[    2.041036] usbcore: registered new interface driver usb-storage
[    2.049215] mousedev: PS/2 mouse device common for all mice
[    2.057173] bcm2835-cpufreq: min=700000 max=700000 cur=700000
[    2.064665] bcm2835-cpufreq: switching to governor powersave
[    2.071987] bcm2835-cpufreq: switching to governor powersave
[    2.079240] sdhci: Secure Digital Host Controller Interface driver
[    2.087013] sdhci: Copyright(c) Pierre Ossman
[    2.093098] mmc-bcm2835: Unable to initialise DMA channels. Falling back to PIO
[    2.136993] Load BCM2835 MMC driver
[    2.142384] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.149877] ledtrig-cpu: registered to indicate activity on CPUs
[    2.158809] hidraw: raw HID events driver (C) Jiri Kosina
[    2.171533] usbcore: registered new interface driver usbhid
[    2.178917] usbhid: USB HID core driver
[    2.189182] TCP: cubic registered
[    2.196205] Initializing XFRM netlink socket
[    2.204231] NET: Registered protocol family 17
[    2.210587] Key type dns_resolver registered
[    2.221037] registered taskstats version 1
[    2.226952] vc-sm: Videocore shared memory driver
[    2.233220] [vc_sm_connected_init]: start
[    2.238972] Indeed it is in host mode hprt0 = 00021501
[    2.247882] [vc_sm_connected_init]: end - returning 0
[    2.260841] mmc0: host does not support reading read-only switch. assuming write-enable.
[    2.289040] mmc0: new hi
gh speed SDHC card at address b368
[    2.307113] mmcblk0: mmc0:b368       14.9 GiB 
[    2.318221]  mmcblk0: p1 p2
[    2.456912] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    2.465252] Indeed it is in host mode hprt0 = 00001101

[    2.667211] usb 1-1: New USB device found, idVendor=0424,
 idProduct=9514
[    2.675744] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.685583] hub 1-1:1.0: USB hub found
[    2.691382] hub 1-1:1.0: 5 ports detected

[    2.976960] usb 1-1.1: new high-speed USB device number 3 
using dwc_otg
[    3.097200] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[    3.105816] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.117750] smsc95xx v1.0.4
[    3.180461] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, a6:f9:d0:af:bb:a0

After this my image hangs, regardless of what type of FS I try to boot from, I have tried initrd, NFS and the standard /ext4 partition on the SD card.

I am rather new to the community so I am not sure if this is normal or not, all thoughts are appreciated!

  • Check out my project Nard SDK which may be what you want: arbetsmyra.dyndns.org/nard It provides easy custom kernel conf and BusyBox. – Ronny Nilsson Jan 23 '15 at 9:30
  • 1
    What about the modules? Did you install those as well? I think it should be able to start init without them, but I am not positive. You also mention trying to boot from a variety of places but nothing about how you are trying to do that. – goldilocks Jan 23 '15 at 19:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.