CONFIG_MMC_ATMELMCI...no devices detected - linux-kernel

I'm trying to compile a kernel for a GESBC-9G20w from Glomation. The board is built around a AT91SAM9G20. My problem is that I can't detect an sd card with my kernel. The demo kernel they provide works, so I know the hardware's good, but I need a newer kernel version.
I can provide lot's more info, but I tried only provide the important stuff for starters.
I'm using kernel source from https://github.com/linux4sam/linux-at91
Kernel config options...
#
# AT91SAM9G20 Board Type
#
CONFIG_MACH_AT91SAM9G20EK=y
CONFIG_MACH_AT91SAM9G20EK_2MMC=y
CONFIG_MACH_CPU9G20=y
CONFIG_MACH_ACMENETUSFOXG20=y
CONFIG_MACH_PORTUXG20=y
CONFIG_MACH_STAMP9G20=y
CONFIG_MACH_PCONTROL_G20=y
CONFIG_MACH_GSIA18S=y
CONFIG_MACH_SNAPPER_9260=y
CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set
# CONFIG_MMC_UNSAFE_RESUME is not set
# CONFIG_MMC_CLKGATE is not set
#
# MMC/SD/SDIO Card Drivers
#
CONFIG_MMC_BLOCK=y
CONFIG_MMC_BLOCK_MINORS=8
CONFIG_MMC_BLOCK_BOUNCE=y
# CONFIG_SDIO_UART is not set
# CONFIG_MMC_TEST is not set
#
# MMC/SD/SDIO Host Controller Drivers
#
# CONFIG_MMC_SDHCI is not set
# CONFIG_MMC_SDHCI_PXAV3 is not set
# CONFIG_MMC_SDHCI_PXAV2 is not set
# CONFIG_MMC_AT91 is not set
CONFIG_MMC_ATMELMCI=y
# CONFIG_MMC_SPI is not set
# CONFIG_MMC_DW is not set
# CONFIG_MMC_VUB300 is not set
# CONFIG_MMC_USHC is not set
# CONFIG_MEMSTICK is not set
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
Boot log...
NET: Registered protocol family 17
input: gpio-keys as /devices/platform/gpio-keys/input/input0
rtc-at91sam9 rtc-at91sam9.0: setting system clock to 1970-01-01 00:16:52 UTC (1012)
atmel_mci atmel_mci: version: 0x210
atmel_mci atmel_mci: no DMA channel available
atmel_mci atmel_mci: using PDC
atmel_mci atmel_mci: Atmel MCI controller at 0xfffa8000 irq 25, 2 slots
ALSA device list:
No soundcards found.
Waiting 5sec before mounting root device...
usb 1-1: new full-speed USB device number 2 using at91_ohci
usb 1-2: new full-speed USB device number 3 using at91_ohci
usb-storage 1-2:1.0: USB Mass Storage device detected
scsi0 : usb-storage 1-2:1.0
scsi 0:0:0:0: Direct-Access 2.0 2.0 5.00 PQ: 0 ANSI: 2
sd 0:0:0:0: [sda] 7968768 512-byte logical blocks: (4.08 GB/3.79 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 0b 00 00 08
sd 0:0:0:0: [sda] No Caching mode page present
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] No Caching mode page present
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 0:0:0:0: [sda] No Caching mode page present
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI removable disk
EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
EXT4-fs (sda1): warning: mounting unchecked fs, running e2fsck is recommended
EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext3 filesystem) on device 8:1.
devtmpfs: mounted
Freeing unused kernel memory: 152K (c03ee000 - c0414000)
...but when I look in /dev, there are no mmcblk devices.
Any ideas?
Thanks!

Related

ROM doesn't load U-Boot on imx6solo

I'm trying to upgrade my u-boot from 2009 to 2020 using buildroot, but when I build the new one it doesn't boot (and I don't have JTAG).
When I load it with imx_usb_loader it works but when I flash it on the Nand, it doesn't boot on it.
As u-boot files, I use mx6sabreauto.c, mx6solo.cfg and mx6sabreauto.h
I don't use SPL or DTS, I only generate u-boot.imx
Boot logs with imx_usb_loader :
U-Boot 2020.04 (Feb 11 2023 - 15:41:38 +0100)
CPU: i.MX6SOLO rev1.3 at 792MHz
CPU: Industrial temperature grade (-40C to 105C) at 50C
Reset cause: POR
Model: i.MX6 DualLite/Solo SABRE Automotive Board
Board: MX6Q-Sabreauto rev#
DRAM: 2 GiB
NAND: nand_base: device found, Manufacturer ID: 0x2c, Chip ID: 0xd3
nand_base: Micron NAND 1GiB 3,3V 8-bit
nand_base: Micron NAND 1GiB 3,3V 8-bit
nand_base: 1024 MiB, SLC, erase size: 256 KiB, page size: 4096, OOB size: 128
use legacy bch geometry
1024 MiB
MMC: FSL_SDHC: 0, FSL_SDHC: 2
Loading Environment from MMC... MMC: no card present
mmc_init: -123, time 2
Warning - No block device, using default environment
Loading Environment from NAND... Scanning device for bad blocks
Warning - bad CRC, using default environment
No panel detected: default to Hannstar-XGA
Display: Hannstar-XGA (1024x768)
In: serial
Out: serial
Err: serial
Net: FEC [PRIME]
Warning: FEC (eth0) using random MAC address - ea:37:e5:51:c1:86
Boot from USB for mfgtools
Warning - Use default environment for
using default environment
Hit any key to stop autoboot: 0
Flash logs :
=> nand erase 0x0 0x40000000
NAND erase: device 0 whole chip
Erasing at 0x3ffc0000 -- 100% complete.
OK
=> tftp 0x10800000 u-boot.imx
Using FEC device
TFTP from server 192.168.30.30; our IP address is 192.168.30.10
Filename 'u-boot.imx'.
Load address: 0x10800000
Loading: #####################################################
3.9 MiB/s
done
Bytes transferred = 777216 (bdc00 hex)
=> nand read 0x10800000 0x00000000 777216
NAND read: device 0 offset 0x0, size 0x777216
7827990 bytes read: OK
=> reset
resetting ...
It worked when I flashed from the Linux rootfs using these commands :
$ flash_erase /dev/mtd0 0 0
$ kobs-ng init -x u-boot.imx --search_exponent=1 -v
It seems that the "search-exponent" option did the trick.

agl-sota u-boot raspberrypi3 - Card did not respond to voltage select! Device 0: unknown device

I am building an automotive-grade-linux demo image using yocto for raspberrypi3.
I am adding a layer agl-sota for OTA feature. This is where my u-boot breaks.
While booting up according to defconfig CONFIG_ENV_EXT4_DEVICE_AND_PART="0:1" u-boot takes mmc0 which is sd card that can be verified through 'mmc info' and partition 1.
Yet it shows:
U-Boot 2020.10 (Jun 29 2020 - 03:06:40 +0000)
DRAM: 768 MiB
RPI 3 Model B (0xa02082)
MMC: mmc#7e202000: 0, sdhci#7e300000: 1
Loading Environment from FAT... *** Warning - bad CRC, using default environment
In: serial
Out: vidconsole
Err: vidconsole
Net: No ethernet found.
starting USB...
Bus usb#7e980000: USB DWC2
scanning bus usb#7e980000 for devices... 3 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Card did not respond to voltage select!
Device 0: unknown device
Waiting for Ethernet connection... unable to connect.
...
...
u-boot >
'mmc info' output:
U-Boot> mmc info
Device: mmc#7e202000
Manufacturer ID: 3
OEM: 5344
Name: SU16G
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.8 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
What configuration issue is disallowing u-boot to boot the kernel.?
I am using raspberrypi imager for flashing the wic.xz image.

Allwinner A13 hang on boot and return "SPL:Unsupported Boot Device!" error

I am new in here and I am sorry my bad English.
I have OLinuXino A13 board. I endeavor kernel and boot events. So I try boot OLinuxino-A13 via spiflash(in FEL mode). I connected board to my PC(USB OTG). I Sending commands from my computer for writing to spiflash. And differently I build second connect with usb-ttl. So I can see opening writing of board with CuteCom program from my PC. And I use sunxi-tools for write to spiflash of my board.
And I did this:
I compiled kernel and I created u-boot-sunxi-with-spl.bin file. After I entered FEL mode and I wrote this file to on my board with ./sunxi-fel spiflash-write 0 /path/u-boot-sunxi-with-spl.bin. When I use boot my board from PC with ./sunxi-fel uboot /path/u-boot-sunxi-with-spl.bin, my board start and it work for find to sd card. Result this:
U-Boot SPL 2019.04-rc1-00141-g63f7e3fca3 (Feb 19 2019 - 17:23:48 +0300)
DRAM: 512 MiB
CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from FEL
U-Boot 2019.04-rc1-00141-g63f7e3fca3 (Feb 19 2019 - 17:23:48 +0300) Allwinner Technology
CPU: Allwinner A13 (SUN5I)
Model: Olimex A13-Olinuxino
I2C: ready
DRAM: 512 MiB
MMC: mmc#1c0f000: 0
Loading Environment from FAT... MMC: no card present
Setting up a 1024x768 vga console (overscan 0x0)
In: serial
Out: vga
Err: vga
Allwinner mUSB OTG (Peripheral)
Net:
Warning: usb_ether using MAC address from ROM
eth0: usb_ether
starting USB...
USB0: USB EHCI 1.00
USB1: USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 1 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 2 <0x08><0x08><0x08> 1 <0x08><0x08><0x08> 0
MMC: no card present
Device 0: unknown device
But differently if I restart my board after(card is out of fel mode) ./sunxi-fel spiflash-write 0 /path/u-boot-sunxi-with-spl.bin command. Result this:
U-Boot SPL 2019.04-rc1-00141-g63f7e3fca3 (Feb 19 2019 - 17:23:48 +0300)
DRAM: 512 MiB
CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2
SPL: Unsupported Boot Device!
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
A13-OLinuxino_defconfig file:
CONFIG_ARM=y
CONFIG_ARCH_SUNXI=y
CONFIG_SPL=y
CONFIG_MACH_SUN5I=y
CONFIG_DRAM_CLK=408
CONFIG_DRAM_EMR1=0
CONFIG_MMC0_CD_PIN="PG0"
CONFIG_USB0_VBUS_DET="PG1"
CONFIG_USB1_VBUS_PIN="PG11"
CONFIG_AXP_GPIO=y
# CONFIG_VIDEO_HDMI is not set
CONFIG_VIDEO_VGA_VIA_LCD=y
CONFIG_VIDEO_VGA_VIA_LCD_FORCE_SYNC_ACTIVE_HIGH=y
CONFIG_VIDEO_LCD_POWER="AXP0-0"
CONFIG_VIDEO_LCD_BL_PWM="PB2"
CONFIG_NR_DRAM_BANKS=1
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL_I2C_SUPPORT=y
CONFIG_CMD_DFU=y
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_USB_MASS_STORAGE=y
# CONFIG_SPL_DOS_PARTITION is not set
# CONFIG_SPL_PARTITION_UUIDS is not set
CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino"
CONFIG_DFU_RAM=y
CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
CONFIG_AXP_ALDO3_VOLT=3300
CONFIG_CONS_INDEX=2
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_MUSB_GADGET=y
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=yONFIG_AXP_ALDO3_VOLT=3300
CONFIG_CONS_INDEX=2
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_MUSB_GADGET=y
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
I struggle for exceed this error and want to see result like on above. How can I fix this error?

Beaglebone black uImage boot issues

I am trying to boot the beaglebone black using the uImage file that I created using the mkimage command. There is a emmc to sd image flasher package available online which has a uImage in it and also other required files (https://elinux.org/BeagleBone_Black_Extracting_eMMC_contents), I followed this website and created a flasher card of the uImage that I made using mkimage utility.
I am getting the following error during boot from SD card having that uImage:
U-Boot SPL 2016.01-00763-g3faf221 (Jan 29 2016 - 20:47:08)
Trying to boot from MMC
Card doesn't support part_switch
MMC partition switch failed
*** Warning - MMC partition switch failed, using default environment
reading u-boot.img
reading u-boot.img
U-Boot 2016.01-00763-g3faf221 (Jan 29 2016 - 20:47:08 +0000)
Watchdog enabled
I2C: ready
DRAM: 512 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - bad CRC, using default environment
Net: <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
=> set sdboot 1
=> boot
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
reading boot.scr
** Unable to read file boot.scr **
reading uEnv.txt
235 bytes read in 5 ms (45.9 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...
Running uenvcmd ...
reading uImage
5497536 bytes read in 302 ms (17.4 MiB/s)
reading /am335x-boneblack.dtb
25926 bytes read in 8 ms (3.1 MiB/s)
## Booting kernel from Legacy Image at 82000000 ...
Image Name: Linux kernel
Created: 2015-09-07 21:47:16 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5497472 Bytes = 5.2 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 81ff0000
Booting using the fdt blob at 0x81ff0000
Loading Kernel Image ... OK
Loading Device Tree to 8fff6000, end 8ffff545 ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
[ 0.177572] omap2_mbox_probe: platform not supported
[ 0.333923] tps65217-bl tps65217-bl: no platform data provided
[ 0.397544] bone-capemgr bone_capemgr.9: slot #0: No cape found
[ 0.434652] bone-capemgr bone_capemgr.9: slot #1: No cape found
[ 0.471760] bone-capemgr bone_capemgr.9: slot #2: No cape found
[ 0.508869] bone-capemgr bone_capemgr.9: slot #3: No cape found
[ 0.528815] omap_hsmmc mmc.5: of_parse_phandle_with_args of 'reset' failed
[ 0.591166] pinctrl-single 44e10800.pinmux: pin 44e10854 already requested by 44e10800.pinmux; cannot claim for gpio-leds.8
[ 0.602845] pinctrl-single 44e10800.pinmux: pin-21 (gpio-leds.8) status -22
[ 0.610128] pinctrl-single 44e10800.pinmux: could not request pin 21 on device pinctrl-single
[ 0.686675] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 0.695344] [<c0010f5d>] (unwind_backtrace+0x1/0x98) from [<c04994c3>] (panic+0x5b/0x158)
[ 0.703882] [<c04994c3>] (panic+0x5b/0x158) from [<c07bc94b>] (mount_block_root+0xf7/0x178)
[ 0.712595] [<c07bc94b>] (mount_block_root+0xf7/0x178) from [<c07bcb09>] (mount_root+0x95/0xb0)
[ 0.721676] [<c07bcb09>] (mount_root+0x95/0xb0) from [<c07bcbef>] (prepare_namespace+0xcb/0x11c)
[ 0.730836] [<c07bcbef>] (prepare_namespace+0xcb/0x11c) from [<c0495aff>] (kernel_init+0x7/0x98)
[ 0.740007] [<c0495aff>] (kernel_init+0x7/0x98) from [<c000c7fd>] (ret_from_fork+0x11/0x34)
Any help will be useful.
The kernel cannot find the root partition. The kernel command line is set in U-Boot via the environment variable bootargs.

unable to login buildroot

i use buildroot and compile linux kenrenl and when i run QEMU,i cann't login to builroot, because i cann't see message "Welcome to buildroot" for login,
ata2.01: NODEV after polling detection
ata2.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100
ata1.01: NODEV after polling detection
ata1.00: ATA-7: QEMU HARDDISK, 2.5+, max UDMA/100
ata1.00: 11502 sectors, multi 16: LBA48
ata1.00: configured for MWDMA2
ata2.00: configured for MWDMA2
scsi 0:0:0:0: Direct-Access ATA QEMU HARDDISK 2.5+ PQ: 0
ANSI: 5
sd 0:0:0:0: [sda] 11502 512-byte logical blocks: (5.89 MB/5.62 MiB)
scsi 1:0:0:0: CD-ROM QEMU QEMU DVD-ROM 2.5+ PQ: 0
ANSI: 5
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't
support DPO or FUA
sd 0:0:0:0: [sda] Attached SCSI disk
input: ImExPS/2 Generic Explorer Mouse as
/devices/platform/i8042/serio1/input/input3
EXT4-fs (sda): couldn't mount as ext3 due to feature incompatibilities
EXT4-fs (sda): mounting ext2 file system using the ext4 subsystem
EXT4-fs (sda): mounted filesystem without journal. Opts: (null)
VFS: Mounted root (ext2 filesystem) readonly on device 8:0.
devtmpfs: mounted
Freeing unused kernel memory: 832K (ffffffff8186e000 -
ffffffff8193e000)
Write protecting the kernel read-only data: 8192k
Freeing unused kernel memory: 1212K (ffff8800014d1000 -
ffff880001600000)
Freeing unused kernel memory: 536K (ffff88000177a000 -
ffff880001800000)
random: fast init done
EXT4-fs (sda): warning: mounting unchecked fs, running e2fsck is
recommended
EXT4-fs (sda): re-mounted. Opts:
block_validity,barrier,user_xattr,errors=remount-ro
Starting logging: OK
Initializing random number generator... done.
Starting network: OK
### here, i was unable to see message command for login,
QEMU:
qemu-system-x86_64 -hda buildroot/buildroot 2017.02.2/output/images/rootfs.ext2 -m 2G -smp 2 -nographic -kernel buildroot/buildroot-2017.02.2/output/images/bzImage -append "console=ttyS0 root=/dev/sda debug earlyprintk=serial slub_debug=QUZ"
i don't understand why i am unable to see message "Welcome to buildroot" ??
Maybe you need to modify the bootloader parameter..set the console to ttyS?
or you can modify the rootfs.tar, in the rootfs, edit the etc/inittab
for instance,change ttymxc1 to ttymxc0:
# Put a getty on the serial port
ttymxc0::respawn:/sbin/getty -L ttymxc0 0 vt100 # GENERIC_SERIAL
If you use QEMU nographic option, please check following bullet points:
BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" in buildroot config file
console=ttyS0 in kernel args when run QEMU
Take the sdcard.img file in buildtoot>> output>> images>>sdcard.img
Then make it bootable using balena etcher(when using ubuntu) or rufus(when using windows).
Then flash to memory card.
Then put that card in fpga board.
It will surely work for everyone.
If any doubt: contact parthumahesh1998#gmail.com

Resources