Buildroot does not create /dev entries for emmc on am335x custom board - linux

I have a custom board based on am335x. I am building a buildroot for a minimal root filesystem (minimal by size) : boots off as initramfs. I am able to boot the image but unfortunately there are no /dev/mmcblk0 entry.
I would like to know how to make it create that entry.
The following is some log and data to help.
======================================================================
# ls /dev
console ram14 tty26 tty55
cpu_dma_latency ram15 tty27 tty56
full ram2 tty28 tty57
hwrng ram3 tty29 tty58
i2c-0 ram4 tty3 tty59
i2c-1 ram5 tty30 tty6
input ram6 tty31 tty60
kmem ram7 tty32 tty61
kmsg ram8 tty33 tty62
loop-control ram9 tty34 tty63
loop0 random tty35 tty7
loop1 shm tty36 tty8
loop2 tty tty37 tty9
loop3 tty0 tty38 ttyO0
loop4 tty1 tty39 ttyO1
loop5 tty10 tty4 ttyS0
loop6 tty11 tty40 ttyS1
loop7 tty12 tty41 ttyS2
mem tty13 tty42 ttyS3
network_latency tty14 tty43 ubi_ctrl
network_throughput tty15 tty44 urandom
null tty16 tty45 usbmon0
port tty17 tty46 vcs
psaux tty18 tty47 vcs1
ptmx tty19 tty48 vcsa
pts tty2 tty49 vcsa1
ram0 tty20 tty5 watchdog
ram1 tty21 tty50 watchdog0
ram10 tty22 tty51 zero
ram11 tty23 tty52
ram12 tty24 tty53
ram13 tty25 tty54
# cat /proc/partitions
major minor #blocks name# cat /proc/devices
Character devices:
1 mem
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
7 vcs
10 misc
13 input
29 fb
89 i2c
90 mtd
128 ptm
136 pts
153 spi
166 ttyACM
180 usb
188 ttyUSB
189 usb_device
226 drm
248 ttySDIO
249 usbmon
250 ttyO
251 watchdog
252 ptp
253 pps
254 rtc
Block devices:
1 ramdisk
259 blkext
7 loop
8 sd
31 mtdblock
65 sd
66 sd
67 sd
68 sd
69 sd
70 sd
71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
179 mmc
# cat /etc/fstab
# <file system> <mount pt> <type> <options> <dump> <pass>
/dev/root / ext2 rw,noauto 0 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults,gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs mode=0777 0 0
tmpfs /tmp tmpfs mode=1777 0 0
tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0
sysfs /sys sysfs defaults 0 0
==================================================================
It is booting busybox and using devtmpfs which are defaults for buildroot.
If I use TI's minimalfs, it does show /dev/mmcblk0 so the kernel and device tree are ok. How to solve this.
Regards,
Preetam

You can create this node manually by mknod
mknod [OPTION]... NAME TYPE [MAJOR MINOR]
In your case type would be b (block). Major number you may find in sources or use
cat /proc/devices the minor number is a partition number.
If this is not the case, try to enable udev in buildroot config.

Related

bash sh script with user permissions 755, cannot be run

Why can't run it?
If I run it in the following way, it works:
[usuario#MyPC ~]$ sh ./x11vnc.sh
PORT=5900
First, the permissions, so that you can see that it is in 755.
ls -l
-rw-rw-rw- 1 usuario users 4485 dic 2 11:35 x11vnc.log
-rwxr-xr-x 1 usuario users 117 nov 7 14:06 x11vnc.sh
Second,the script file
cat x11vnc.sh
#!/bin/bash
x11vnc -nap -wait 30 -noxdamage -passwd somepass -display :0 -forever -o ~/x11vnc.log -bg -rfbport 5900
Third, I must clarify the structure of the disks
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 3,6T 0 disk
├─md126 9:126 0 3,6T 0 raid1
│ ├─md126p1 259:3 0 3,6T 0 part /home/usuario
│ └─md126p2 259:4 0 8G 0 part [SWAP]
└─md127 9:127 0 0B 0 md
sdb 8:16 0 3,6T 0 disk
├─md126 9:126 0 3,6T 0 raid1
│ ├─md126p1 259:3 0 3,6T 0 part /home/usuario
│ └─md126p2 259:4 0 8G 0 part [SWAP]
└─md127 9:127 0 0B 0 md
nvme0n1 259:0 0 232,9G 0 disk
├─nvme0n1p1 259:1 0 232,6G 0 part /
└─nvme0n1p2 259:2 0 256M 0 part /boot
I am the user usuario.
I can edit and modify the x11vnc.sh file as I wish, but I can't run it, and I need to run it to include in the auto-start session of the plasma.
[usuario#MyPC ~]$ ~/x11vnc.sh
-bash: /home/usuario/x11vnc.sh: permission denied
Why can't run it?
If I run it in the following way, it works:
[usuario#MyPC ~]$ sh ./x11vnc.sh
PORT=5900
Thank you all, specially to #CharlesDuffy
I change the fstab line from
UUID=16b711b6-789f-4c27-9d6c-d0f744407f00 /home/usuario ext4 auto,exec,rw,user,relatime 0 2
to
UUID=16b711b6-789f-4c27-9d6c-d0f744407f00 /home/usuario ext4 auto,rw,user,exec,relatime 0 2
The position of exec is important, since user also applies noexec. By putting exec after user, you ensure that exec is set. The most important options should be listed last

Remove Volume Group from a re-pourpsed disk

I have this SSD that was in another Ovirt cluster that I destroyed, and now I'm trying to re-purpose this disk but can't seem to clear it. I have tried wipefs and dd but it still shows up in fdisk -l. How can I clear all lvms from this disk?
sudo fdisk -l
Disk /dev/sda: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
Disk model: SAMSUNG MZ7LH3T8
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mmcblk0: 58.25 GiB, 62537072640 bytes, 122142720 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 61C206C7-69A3-4C51-9215-1C0B45E32661
Device Start End Sectors Size Type
/dev/mmcblk0p1 2048 788479 786432 384M Linux filesystem
/dev/mmcblk0p2 788480 1048575 260096 127M EFI System
/dev/mmcblk0p3 1048576 1050623 2048 1M BIOS boot
/dev/mmcblk0p4 1050624 122142686 121092063 57.8G Linux filesystem
[core#h2-master-01 ~]$ sudo lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 3.5T 0 disk
ââgluster_vg_sdc-gluster_thinpool_gluster_vg_sdc_tmeta 253:0 0 15.8G 0 lvm
â ââgluster_vg_sdc-gluster_thinpool_gluster_vg_sdc-tpool 253:2 0 3.5T 0 lvm
â ââgluster_vg_sdc-gluster_thinpool_gluster_vg_sdc 253:3 0 3.5T 1 lvm
â ââgluster_vg_sdc-gluster_lv_data 253:4 0 3.4T 0 lvm
ââgluster_vg_sdc-gluster_thinpool_gluster_vg_sdc_tdata 253:1 0 3.5T 0 lvm
ââgluster_vg_sdc-gluster_thinpool_gluster_vg_sdc-tpool 253:2 0 3.5T 0 lvm
ââgluster_vg_sdc-gluster_thinpool_gluster_vg_sdc 253:3 0 3.5T 1 lvm
ââgluster_vg_sdc-gluster_lv_data 253:4 0 3.4T 0 lvm
mmcblk0 179:0 0 58.2G 0 disk
ââmmcblk0p1 179:1 0 384M 0 part /boot
ââmmcblk0p2 179:2 0 127M 0 part /boot/efi
ââmmcblk0p3 179:3 0 1M 0 part
ââmmcblk0p4 179:4 0 57.8G 0 part /sysroot
mmcblk0boot0 179:8 0 4M 1 disk
mmcblk0boot1 179:16 0 4M 1 disk
[core#h2-master-01 ~]$ sudo lvdisplay
[core#h2-master-01 ~]$ sudo vgdisplay
[core#h2-master-01 ~]$ sudo pvdisplay
wipefs -a /dev/sda with a reboot seemed looks to have cleared the disk. Thanks all!

Facing issue in loading UART for Beaglebone debian

I am facing issue in loading uart port for Beaglebone Debian.
Following are my configurations:
I have a beaglebone with Debian OS. I have an sd card with 4 Partitions.
Partition 1 ( mmcblk0p1 ) contains following bootloader configurations:-
/boot/dtbs/4.14.71-ti-r80/am335x-bonegreen-wireless.dtb
/boot/vmlinuz-4.14.71-ti-r80
/boot/uEnv.txt
/boot/initrd.img-4.14.71-ti-r80
/lib/firmware/BB-UART4-00A0.dtbo
/lib/firmware/BB-UART1-00A0.dtbo
/lib/firmware/BB-I2C2-00A0.dtbo
/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
/lib/firmware/BB-BBGW-WL1835-00A0.dtbo
/lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo
/lib/firmware/BB-ADC-00A0.dtbo
/uEnv.txt
Partition 2 ( mmcblk0p2 ) contains the Debian OS.
Partition 3 ( mmcblk0p3 ) contains another Debian OS.
Partition 4 ( mmcblk0p4 ) decides from Which partition to boot?
/uEnv.txt from mmcblk0p1 reads from mmcblk0p4 and decides from which partition to boot.
This is my /uEnv.txt:
rdaddr=0x88080000
initrd_high=0xffffffff
fdt_high=0xffffffff
loadxrd=echo debug: [/boot/initrd.img-${uname_r}] ... ; load mmc 0:1 ${rdaddr} /boot/initrd.img-${uname_r}; setenv rdsize ${filesize}
loaduEnvtxt=load mmc 0:1 ${loadaddr} /boot/uEnv.txt ; env import -t ${loadaddr} ${filesize};
check_dtb=if test -n ${dtb}; then setenv fdtfile ${dtb};fi;
check_uboot_overlays=if test -n ${enable_uboot_overlays}; then setenv enable_uboot_overlays ;fi;
loadall=run loaduEnvtxt; run check_dtb; run check_uboot_overlays; run loadxrd;
rootpart=0:2
flagpart=0:4
bootdir=/boot
bootfile=vmlinuz-4.14.71-ti-r80
console=ttyO0,115200n8
fdtaddr=0x88000000
fdtfile=am335x-bonegreen-wireless.dtb
loadaddr=0x82000000
mmcroot=/dev/mmcblk0p2 ro
mmcrootfstype=ext4 rootwait
mmcargs=setenv bootargs console=${console} ${optargs} ${cape_disable} ${cape_enable} root=${mmcroot} rootfstype=${mmcrootfstype} ${cmdline}
loadfdt=echo debug: [/boot/dtbs/${uname_r}/${fdtfile}] ... ;load mmc 0:1 ${fdtaddr} /boot/dtbs/${uname_r}/${fdtfile}
loadimage=echo debug: [/boot/vmlinuz-${uname_r}] ... ; load mmc 0:1 ${loadaddr} /boot/vmlinuz-${uname_r}
boot_three=setenv rootpart 0:3; setenv mmcroot /dev/mmcblk0p3 ro
findroot=\
if test -e mmc $flagpart three; then \
if test -e mmc $flagpart three_ok; then \
run boot_three; \
elif test ! -e mmc $flagpart three_tried; then \
fatwrite mmc $flagpart $loadaddr three_tried 4; \
run boot_three; \
fi; \
elif test -e mmc $flagpart two; then \
if test ! -e mmc $flagpart two_ok; then \
if test -e mmc $flagpart two_tried; then \
run boot_three; \
else \
fatwrite mmc $flagpart $loadaddr two_tried 4; \
fi; \
fi; \
fi;
uenvcmd=\
run loadall; \
run findroot; \
echo Using root partition ${rootpart}; \
if run loadfdt; then \
echo Loaded ${fdtfile}; \
if run loadimage; then \
run mmcargs; \
bootz ${loadaddr} - ${fdtaddr}; \
fi; \
fi;
In /boot/uEnv.txt I have enabled following Configs:
uname_r=4.14.71-ti-r80
enable_uboot_overlays=1
uboot_overlay_addr0=/lib/firmware/BB-UART4-00A0.dtbo
uboot_overlay_addr1=/lib/firmware/BB-UART1-00A0.dtbo
uboot_overlay_addr2=/lib/firmware/BB-I2C2-00A0.dtbo
uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
enable_uboot_cape_universal=1
cmdline=coherent_pool=1M net.ifnames=0 quiet
My Boot logs:
U-Boot SPL 2018.09-00002-g0b54a51eee (Sep 10 2018 - 19:41:39 -0500)
Trying to boot from MMC2
Loading Environment from EXT4...
** Unable to use mmc 0:1 for loading the env **
U-Boot 2018.09-00002-g0b54a51eee (Sep 10 2018 - 19:41:39 -0500), Build: jenkins-github_Bootloader-Builder-65
CPU : AM335X-GP rev 2.1
I2C: ready
DRAM: 512 MiB
No match for driver 'omap_hsmmc'
No match for driver 'omap_hsmmc'
Some drivers were not found
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4...
** Unable to use mmc 0:1 for loading the env **
Board: BeagleBone Black
<ethaddr> not set. Validating first E-fuse MAC
BeagleBone Black:
Model: SeeedStudio BeagleBone Green Wireless:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net: eth0: MII MODE
Could not get PHY for cpsw: addr 0
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
board_name=[A335BNLT] ...
board_rev=[GW1A] ...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
60067 bytes read in 6 ms (9.5 MiB/s)
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
2628 bytes read in 2 ms (1.3 MiB/s)
gpio: pin 55 (gpio 55) value is 1
Loaded environment from /uEnv.txt
Importing environment from mmc ...
Checking if uenvcmd is set ...
gpio: pin 56 (gpio 56) value is 1
Running uenvcmd ...
2113 bytes read in 3 ms (687.5 KiB/s)
debug: [/boot/initrd.img-4.14.71-ti-r80] ...
4799493 bytes read in 303 ms (15.1 MiB/s)
Using root partition 0:2
debug: [/boot/dtbs/4.14.71-ti-r80/am335x-bonegreen-wireless.dtb] ...
60067 bytes read in 8 ms (7.2 MiB/s)
Loaded am335x-bonegreen-wireless.dtb
debug: [/boot/vmlinuz-4.14.71-ti-r80] ...
10416640 bytes read in 652 ms (15.2 MiB/s)
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Using Device Tree in place at 88000000, end 88011aa2
Starting kernel ...
[ 0.000749] timer_probe: no matching timers found
[ 0.783193] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[ 1.073624] omap_voltage_late_init: Voltage driver support not added
[ 1.080550] PM: Cannot get wkup_m3_ipc handle
Question:
Now when I boot into the partition and check for the UART port I am unable to find them.
ls -l /dev/ttyO*
lrwxrwxrwx 1 root root 5 Nov 3 2016 /dev/ttyO0 -> ttyS0
lrwxrwxrwx 1 root root 5 Nov 3 2016 /dev/ttyO2 -> ttyS2
The output I am expecting is:
lrwxrwxrwx 1 root root 5 Nov 3 2016 /dev/ttyO0 -> ttyS0
lrwxrwxrwx 1 root root 5 Nov 3 2016 /dev/ttyO1 -> ttyS1
lrwxrwxrwx 1 root root 5 Nov 3 2016 /dev/ttyO2 -> ttyS2
lrwxrwxrwx 1 root root 5 Nov 3 2016 /dev/ttyO3 -> ttyS3
lrwxrwxrwx 1 root root 5 Nov 3 2016 /dev/ttyO4 -> ttyS4
lrwxrwxrwx 1 root root 5 Nov 3 2016 /dev/ttyO5 -> ttyS5

Run program on boot with initramfs

I'm running uClinux on a SmartFusion2 as part of a University team building a small cube satellite. However, I'm not super experienced in Linux kernel, and this issue has had me stumped for a few days. I'm trying to get the SmartFusion to run a program on bootup. Currently, the only .uImage that does this is the test 'hello' file. I'm trying to recreate the process for another program, but am running into some difficulties.
in my hello directory I have the following files: hello.busybox, hello.kernel.M2S, help.txt, hello.uImage, Makefile, hello.initramfs, hello (directory)
in the hello subdirectory (projects/hello/hello):
hello (executable), hello.c, hello.gdb, hello.h, hello.o, Makefile
to try and get the uImage to boot and run a different program, I made a copy of my projects/hello/hello directory and renamed it 'goodbye', with a few minor changes int the .h and .c files for testing purposes. Now I'm trying to get the executable 'hello' in projects/hello/goodbye to run on boot.
My initramfs file originally looked like this:
# This is a very simple, default initramfs
dir /dev 0755 0 0
nod /dev/console 0600 0 0 c 5 1
nod /dev/tty 0666 0 0 c 5 0
nod /dev/null 0600 0 0 c 1 3
nod /dev/mem 0600 0 0 c 1 1
nod /dev/kmem 0600 0 0 c 1 2
nod /dev/zero 0600 0 0 c 1 5
nod /dev/random 0600 0 0 c 1 8
nod /dev/urandom 0600 0 0 c 1 9
dir /dev/pts 0755 0 0
nod /dev/ptmx 0666 0 0 c 5 2
nod /dev/ttyS0 0666 0 0 c 4 64
nod /dev/ttyS1 0666 0 0 c 4 65
nod /dev/ttyS2 0666 0 0 c 4 66
nod /dev/ttyS3 0666 0 0 c 4 67
nod /dev/ttyS4 0666 0 0 c 4 68
nod /dev/ttyS5 0666 0 0 c 4 69
dir /bin 755 0 0
dir /proc 755 0 0
file /bin/hello ${INSTALL_ROOT}/projects/${SAMPLE}/hello/hello 755 0 0
slink /bin/init hello 777 0 0
I changed the last two lines of the initramfs to read as follows:
file /bin/hello ${INSTALL_ROOT}/projects/${SAMPLE}/hello/goodbye 755 0 0
slink /bin/init hello 777 0 0
But when I try and boot the SmartFusion2 after remaking the uImage, I get this, witht the error at the bottom:
Starting kernel ...
Linux version 2.6.33-arm1 (ecenstudent#EE10308) (gcc version 4.4.1 (Sourcery G++ Lite 2010q1-189) ) #38 Thu May 25 09:09:08 MDT 2017
CPU: ARMv7-M Processor [412fc231] revision 1 (ARMv7M)
CPU: NO data cache, 8K instruction cache
Machine: Microsemi M2S
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: m2s_platform=m2s-fg484-som console=ttyS0,115200 panic=10 ip=10.2.118.102:10.2.118.101:192.168.0.1::m2s-fg484-som:eth0:off ethaddr=3C:FB:96:05:00:53
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 64408k/64408k available, 1128k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0x00000000 - 0x00001000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
vmalloc : 0x00000000 - 0xffffffff (4095 MB)
lowmem : 0xa0000000 - 0xa4000000 ( 64 MB)
modules : 0xa0000000 - 0x01000000 (1552 MB)
.init : 0xa0008000 - 0xa0012000 ( 40 kB)
.text : 0xa0074bc0 - 0xa0083000 ( 58 kB)
.data : 0xa0084000 - 0xa008cce0 ( 36 kB)
Hierarchical RCU implementation.
NR_IRQS:83
Calibrating delay loop... 132.30 BogoMIPS (lpj=661504)
Mount-cache hash table entries: 512
Switching to clocksource mss_timer2
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x40000000 (irq = 10) is a 16550A
console [ttyS0] enabled
serial8250.1: ttyS1 at MMIO 0x40010000 (irq = 11) is a 16550A
Freeing init memory: 40K
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Backtrace: no frame pointer
Rebooting in 10 seconds..
Can somebody help explain why this is happening and what I need to do to my initramfs to make it run the proper program on boot? Thanks!!
As it turns out, I was confused about how those two lines worked. When I finally figured it out, they looked like this:
file /bin/hello ${INSTALL_ROOT}/projects/${SAMPLE}/goodbye/hello 755 0 0
slink /bin/init hello 777 0 0
then it worked as desired, and I was able to implement it into other uImages.

Kernel Panic after SMP Implementation - Attempted to kill init

I am working on implementing SMP support in Linux kernel for Marvell PXA2128 ARM SoC. I am using Linus Torvald kernel as base kernel. Kernel version is 3.5. I have added SMP support in Linux kernel, I am able to boot with the second core but sometimes my kernel crashes with "Attempted to kill Init" message, that is, init process of initramfs dies somehow, don't know why. I thought L1 cache of second core is corrupted, so I invalidated the L1 cache of second core before it enters the Linux kernel execution. Crash log of kernel is like
[ 16.413024] Freeing init memory: 268K
[ 16.658111] tmpfs: No value for mount option 'strictatime'
[ 16.809997] scsi 0:0:0:0: Direct-Access SanDisk Cruzer Blade 1.27 PQ: 0 ANSI: 6
[ 16.827545] tmpfs: No value for mount option 'strictatime'
[ 16.972473] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 16.972930] sd 0:0:0:0: [sda] 15330304 512-byte logical blocks: (7.84 GB/7.30 GiB)
[ 16.974487] sd 0:0:0:0: [sda] Write Protect is off
[ 16.976104] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 17.369537] sda: sda1 sda2
[ 17.377258] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 17.602966] tmpfs: No value for mount option 'strictatime'
[ 18.074981] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
[ 18.074981]
[ 18.222442] [<c001691c>] (unwind_backtrace+0x0/0x128) from [<c046beb0>] (dump_stack+0x20/0x24)
[ 18.301177] [<c046beb0>] (dump_stack+0x20/0x24) from [<c046bfcc>] (panic+0x94/0x1d4)
[ 18.378265] [<c046bfcc>] (panic+0x94/0x1d4) from [<c002ad08>] (do_exit+0x390/0x7ac)
[ 18.454956] [<c002ad08>] (do_exit+0x390/0x7ac) from [<c002b37c>] (do_group_exit+0x0/0xc4)
[ 18.533111] CPU0: stopping
[ 18.605621] [<c001691c>] (unwind_backtrace+0x0/0x128) from [<c046beb0>] (dump_stack+0x20/0x24)
[ 18.687225] [<c046beb0>] (dump_stack+0x20/0x24) from [<c00145ac>] (handle_IPI+0x104/0x174)
[ 18.770141] [<c00145ac>] (handle_IPI+0x104/0x174) from [<c0008590>] (gic_handle_irq+0x60/0x68)
[ 18.854888] [<c0008590>] (gic_handle_irq+0x60/0x68) from [<c000e6c0>] (__irq_svc+0x40/0x70)
[ 18.940093] Exception stack(0xc0685f38 to 0xc0685f80)
[ 19.022155] 5f20: c06c4c28 a0000093
[ 19.108398] 5f40: 00000001 60400100 c0684000 c06c48c8 c047560c c0691438 c177a080 562f5842
[ 19.188018] SMP: failed to stop secondary CPUs
[ 19.275970] 5f60: 00000000 c0685f9c c0685f40 c0685f80 c0020668 c0010068 60000013 ffffffff
[ 19.363708] [<c000e6c0>] (__irq_svc+0x40/0x70) from [<c0010068>] (cpu_idle+0x94/0xdc)
[ 19.450805] [<c0010068>] (cpu_idle+0x94/0xdc) from [<c0462d24>] (rest_init+0x7c/0x94)
[ 19.537292] [<c0462d24>] (rest_init+0x7c/0x94) from [<c063f89c>] (start_kernel+0x328/0x380)
Now when my kernel boots successfully, the output of cat /proc/interrupts is like
bash-4.2# cat /proc/interrupts
CPU0 CPU1
39: 101 0 GIC pxa_i2c-i2c
45: 0 26692 GIC timer0
46: 26578 0 GIC timer1
52: 27 0 GIC olpc-ec-1.75
58: 0 0 GIC mmp-vmeta
60: 1142 0 GIC UART3
71: 0 0 GIC mmc2
72: 0 0 GIC olpc-kbd
73: 25978 0 GIC pxa168fb-dss
76: 2282 0 GIC ehci_hcd:usb1
84: 246 0 GIC mmc0
85: 9820 0 GIC mmc1
132: 0 0 ICU rtc Alrm
133: 0 0 ICU rtc 1Hz
137: 0 0 ICU galcore interrupt service
139: 88 0 ICU galcore interrupt service for 2D
141: 20 0 ICU pxa_i2c-i2c
143: 0 0 ICU pxa_i2c-i2c
145: 328 0 ICU pxa_i2c-i2c
186: 52 0 ICU mmc3
252: 0 0 GPIO hsdet-gpio
253: 0 0 GPIO hdmi-hpd
270: 0 0 GPIO d4280000.sdhci cd
278: 0 0 GPIO sdhci_wakeup_irq, sdhci_wakeup_irq, sdhci_wakeup_irq, sdhci_wakeup_irq
335: 0 0 GPIO micdet-gpio
365: 0 0 GPIO DCON
368: 0 0 GPIO olpc-switch-1.75-lid
369: 0 0 GPIO olpc-switch-1.75-ebook
393: 0 0 GPIO olpc-ec-1.75-wake
IPI0: 0 0 Timer broadcast interrupts
IPI1: 3508 4069 Rescheduling interrupts
IPI2: 0 0 Function call interrupts
IPI3: 7 429 Single function call interrupts
IPI4: 0 0 CPU stop interrupts
Err: 0
bash-4.2#
Please give me a clue what important I am missing in SMP implementation.

Resources