i have dynamic_debug enabled and #define DEBUG in mtk-sd.c…any other options (#define debug in another file)?
maybe debug-log is somewhere in Filesystem? i uploaded the bootlog from minicom…
i have dynamic_debug enabled and #define DEBUG in mtk-sd.c…any other options (#define debug in another file)?
maybe debug-log is somewhere in Filesystem? i uploaded the bootlog from minicom…
try to add “ccflags-y :=-DDEBUG” in makefile or CONFIG_CMDLINE=“loglevel=8”
added the “ccflags-y :=-DDEBUG” to drivers/mmc/Makefile (main makefile is very big…where is the right section?) and the loglevel:
# cat /proc/cmdline
earlyprintk console=ttyS0,115200 vmalloc=496M debug=7 loglevel=8 no_console_suspend
but still no more messages for the SD-Card:
# grep '1124' /var/log/messages
Jan 1 00:00:01 goodman48 user.info kernel: [ 1.491610] mtk-msdc 11240000.mmc: Got CD GPIO
Jan 1 00:00:01 goodman48 user.debug kernel: [ 1.496447] mtk-msdc 11240000.mmc: init hardware done!
Jan 1 00:00:01 goodman48 user.debug kernel: [ 1.525378] mtk-msdc 11240000.mmc: Bus Width = 0
Jan 1 00:00:01 goodman48 user.debug kernel: [ 1.529964] mtk-msdc 11240000.mmc: init hardware done!
Jan 1 00:00:01 goodman48 user.debug kernel: [ 1.564732] mtk-msdc 11240000.mmc: Bus Width = 0
Jan 1 00:00:01 goodman48 user.debug kernel: [ 1.575001] mtk-msdc 11240000.mmc: sclk: 399999, timing: 0
Jan 1 00:00:01 goodman48 user.debug kernel: [ 1.635413] mtk-msdc 11240000.mmc: Bus Width = 0
Jan 1 00:00:01 goodman48 user.debug kernel: [ 1.663529] mtk-msdc 11240000.mmc: set mclk to 0
4.14_debug.log (42,6 KB)
full debug (added -DDEBUG to main makefile, login is hidden behind serial interrupt-messages): boot-4.14_sd_debug.log.zip (92,8 KB)
related messages from full debug log:
[ 23.567048] mtk-msdc 11240000.mmc: no init pinctrl state
[ 23.572318] mediatek-mt2701-pinctrl 1000b000.pinctrl: request pin 107 (MSDC1_DAT0) for 11240000.mmc
[ 23.581318] mediatek-mt2701-pinctrl 1000b000.pinctrl: request pin 108 (MSDC1_DAT1) for 11240000.mmc
[ 23.590318] mediatek-mt2701-pinctrl 1000b000.pinctrl: request pin 109 (MSDC1_DAT2) for 11240000.mmc
[ 23.599317] mediatek-mt2701-pinctrl 1000b000.pinctrl: request pin 110 (MSDC1_DAT3) for 11240000.mmc
[ 23.608314] mediatek-mt2701-pinctrl 1000b000.pinctrl: request pin 105 (MSDC1_CMD) for 11240000.mmc
[ 23.617226] mediatek-mt2701-pinctrl 1000b000.pinctrl: request pin 106 (MSDC1_CLK) for 11240000.mmc
[ 23.626135] mediatek-mt2701-pinctrl 1000b000.pinctrl: request pin 29 (EINT7) for 11240000.mmc
[ 23.634615] mediatek-mt2701-pinctrl 1000b000.pinctrl: request pin 261 (MSDC1_INS) for 11240000.mmc
[ 23.643524] mtk-msdc 11240000.mmc: no sleep pinctrl state
[ 23.648879] mtk-msdc 11240000.mmc: no idle pinctrl state
[ 23.654164] OF: no dma-ranges found for node(/mmc@11240000)
[ 23.659694] mtk-msdc 11240000.mmc: device is not dma coherent
[ 23.665409] mtk-msdc 11240000.mmc: device is not behind an iommu
[ 23.671380] devices_kset: Moving 11240000.mmc to end of list
[ 23.677038] mtk-msdc 11240000.mmc: GPIO lookup for consumer cd
[ 23.682839] mtk-msdc 11240000.mmc: using device tree for GPIO lookup
[ 23.689155] of_get_named_gpiod_flags: parsed 'cd-gpios' property of node '/mmc@11240000[0]' - status (0)
[ 23.698581] mediatek-mt2701-pinctrl 1000b000.pinctrl: request pin 261 (MSDC1_INS) for 1000b000.pinctrl:493
[ 23.708188] mtk-msdc 11240000.mmc: Got CD GPIO
[ 23.712597] mtk-msdc 11240000.mmc: GPIO lookup for consumer wp
[ 23.718402] mtk-msdc 11240000.mmc: using device tree for GPIO lookup
[ 23.724720] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/mmc@11240000[0]'
[ 23.733449] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/mmc@11240000[0]'
[ 23.742078] mtk-msdc 11240000.mmc: using lookup tables for GPIO lookup
[ 23.748565] mtk-msdc 11240000.mmc: lookup for GPIO wp failed
[ 23.754225] mtk-msdc 11240000.mmc: Looking up vmmc-supply from device tree
[ 23.761070] debugfs: creating file '11240000.mmc-vmmc'
[ 23.766191] debugfs: creating file 'uA_load'
[ 23.770427] debugfs: creating file 'min_uV'
[ 23.774592] debugfs: creating file 'max_uV'
[ 23.778743] debugfs: creating file 'constraint_flags'
[ 23.783780] mtk-msdc 11240000.mmc: Looking up vqmmc-supply from device tree
[ 23.790707] debugfs: creating file '11240000.mmc-vqmmc'
[ 23.795908] debugfs: creating file 'uA_load'
[ 23.800144] debugfs: creating file 'min_uV'
[ 23.804308] debugfs: creating file 'max_uV'
[ 23.808457] debugfs: creating file 'constraint_flags'
[ 23.813490] OF: comparing source with source
[ 23.817735] OF: comparing hclk with source
[ 23.821794] OF: comparing hclk with hclk
[ 23.825709] OF: of_irq_parse_one: dev=/mmc@11240000, index=0
[ 23.831335] OF: parent=/interrupt-controller@10200100, intsize=3
[ 23.837392] OF: intspec=0
[ 23.840073] of_irq_parse_raw: /interrupt-controller@10200100:00000000,00000028,00000008
[ 23.848122] OF: of_irq_parse_raw: ipar=/interrupt-controller@10200100, size=3
[ 23.855212] OF: -> addrsize=2
[ 23.858238] OF: -> got it !
[ 23.861098] mtk-msdc 11240000.mmc: obtain a copy of previously claimed pinctrl
[ 23.868283] cma: cma_alloc(cma c11be77c, count 1, align 0)
[ 23.873785] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
[ 23.873795] cma: cma_alloc(): returned e0768820
[ 23.873818] cma: cma_alloc(cma c11be77c, count 4, align 2)
[ 23.873840] cma: cma_alloc(): returned e0768900
[ 23.873920] mtk-msdc 11240000.mmc: init hardware done!
[ 23.873971] device: 'mmc1': device_add
[ 23.873980] kobject: 'mmc_host' (def87280): kobject_add_internal: parent: '11240000.mmc', set: '(null)'
[ 23.873994] kobject: 'mmc1' (defd8810): kobject_add_internal: parent: 'mmc_host', set: 'devices'
[ 23.874041] PM: Adding info for No Bus:mmc1
[ 23.874048] kobject: 'mmc1' (defd8810): kobject_uevent_env
[ 23.874058] kobject: 'mmc1' (defd8810): fill_kobj_path: path = '/devices/platform/11240000.mmc/mmc_host/mmc1'
[ 23.874073] debugfs: creating file 'mmc1'
[ 23.874086] debugfs: creating file 'ios'
[ 23.874093] debugfs: creating file 'clock'
[ 23.874108] mmc1: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 21 width 1 timing 0
[ 23.874114] mtk-msdc 11240000.mmc: Bus Width = 0
[ 23.874127] mtk-msdc 11240000.mmc: init hardware done!
[ 23.874155] mtk-msdc 11240000.mmc: mmc_regulator_set_vqmmc: found vmmc voltage range of 3300000-3400000uV
lines 19029-19096 from above Logfile, after that here are dropped lines and much messages of creating files in debugfs with names clk_*, repeating from 19101-21093
maybe the “wp-gpio”-messages are the Problem?
below log is some successful log i have. but i also have found it can’t be detected at boot time. the log is shown when i replug for several times in the card after the boot.
[ 44.153800] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 44.159440] mtk-msdc 11240000.mmc: Bus Width = 2
[ 44.164035] mmc1: new high speed SDHC card at address aaaa
[ 44.170007] mmcblk1: mmc1:aaaa SC16G 14.8 GiB
[ 44.174986] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 44.180639] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 44.186264] mtk-msdc 11240000.mmc: DMA start
[ 44.190499] mtk-msdc 11240000.mmc: msdc_start_data: cmd=18 DMA data: 8 blocks; read=1
[ 44.198265] mtk-msdc 11240000.mmc: msdc_irq: events=00003040
[ 44.203877] mtk-msdc 11240000.mmc: DMA status: 0x 6
[ 44.209230] mtk-msdc 11240000.mmc: DMA stop
[ 44.213468] mmcblk1: p1
[ 44.216584] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 44.428169] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 44.638158] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
i see that system recognize the removal of SD-Card, but not the re-inserting
14.4.-reenter.log (24,7 KB)
Hi, Frank
Good news, I should have solved the problems.
it is a polarity problem that pin for card detected should be used as LOW ACTIVE instead of HIGH ACTIVE. it worked for me. you can follow below steps to see whether it worked for you.
please apply all patches https://patchwork.ozlabs.org/cover/823758/ you should have done as your previous replied
in mt7623.dtsi
mmc0: mmc@11230000 {
compatible = "mediatek,mt7623-mmc",
"mediatek,mt2701-mmc"; ==> fall back to mt2701 instead mt8135
reg = <0 0x11230000 0 0x1000>;
interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_MSDC30_0>,
<&topckgen CLK_TOP_MSDC30_0_SEL>;
clock-names = "source", "hclk";
status = "disabled";
};
mmc1: mmc@11240000 {
compatible = "mediatek,mt7623-mmc",
"mediatek,mt2701-mmc";==> fall back to mt2701 instead mt8135
reg = <0 0x11240000 0 0x1000>;
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_MSDC30_1>,
<&topckgen CLK_TOP_MSDC30_1_SEL>;
clock-names = "source", "hclk";
status = "disabled";
};
in mt7623n-bananapi-bpi-r2.dts
&mmc1 {
pinctrl-names = "default", "state_uhs";
pinctrl-0 = <&mmc1_pins_default>;
pinctrl-1 = <&mmc1_pins_uhs>;
status = "okay";
bus-width = <4>;
max-frequency = <50000000>;
cap-sd-highspeed;
cd-gpios = <&pio 261 1>; ==> used as GPIO_ACTIVE_LOW, which is very critical setup
vmmc-supply = <&mt6323_vmch_reg>;
vqmmc-supply = <&mt6323_vmc_reg>;
};
thank you for this, info, i’ll test it when i’m at home
strange…in 4.4.70 it is also 0 (should not work, but there it does)
&mmc1 {
pinctrl-names = "default", "state_uhs";
pinctrl-0 = <&mmc1_pins_default>;
pinctrl-1 = <&mmc1_pins_uhs>;
status = "okay";
bus-width = <4>;
max-frequency = <50000000>;
cap-sd-highspeed;
cd-gpios = <&pio 261 0>; <<<<<<<<
/*
wp-gpios = <&pio 29 0>;
*/
vmmc-supply = <&mt6323_vmch_reg>;
vqmmc-supply = <&mt6323_vmc_reg>;
};
After reviewing more on the 4.4 driver, i found the mtk-sd.c in 4.4 doesn’t have get_cd callback but it does in upstream kernel and thus 4.4 always bypasses the sanity check if card is present and upstream we MUST assign the exact what the core is expected to.
in drivers/mmc/core/core.c will check if get_cd is available.
if (mmc_card_is_removable(host) && host->ops->get_cd &&
host->ops->get_cd(host) == 0) {
mmc_power_off(host);
mmc_release_host(host);
goto out;
}
wow, MMC1 is detected on boot:
[ 2.584326] mmc0: new high speed MMC card at address 0001
[ 2.594712] mmc1: new high speed SDHC card at address 0001
[ 2.600445] mmcblk0: mmc0:0001 8WPD3R 7.28 GiB
[ 2.605110] mmcblk1: mmc1:0001 00000 7.61 GiB <<<<<<<<<<
[ 2.609766] mmcblk0boot0: mmc0:0001 8WPD3R partition 1 4.00 MiB
[ 2.616032] mmcblk0boot1: mmc0:0001 8WPD3R partition 2 4.00 MiB
[ 2.660531] mmcblk1: p1 p2 <<<<<<<<<<<<<<<
thank you very much, linkerosa
i have not patched any more files, only step 2&3 (have patched used my patch above: 4.14-mmc2.patch)
4.14-mmc2.patch (6,4 KB)
have you an idea, why gpio not available (file mt_gpio in 4.4.70)?
# ls /sys/devices/platform/1000b000.pinctrl/
driver/ gpiochip0/ of_node/ subsystem/
driver_override modalias power/ uevent
maybe it’s another filename…
source seems to be here (4.4.70): drivers/pinctrl/mediatek/pinctrl-mtk-common.c
maybe this is relevant:
and
added pinctrl-mtk-mt7623.h and pinctrl-mt7623.c to drivers/pinctrl/mediatek/, changed Makefile and Kconfig, build (was selected automaticly in menuconfig), but it’s not enough
Congratulations. as I knew the situation for mediatek gpio in upstream driver, the gpio is bound with the pinctrl and it has been exported into /sys/class/gpio/… through gpiolib and also you must enable CONFIG_GPIO_SYSFS in your config. file.
for example. to test gpio 206 through /sys interface
step1. To know what the base gpio expects to
# cat /sys/kernel/debug/pinctrl/1000b000.pinctrl/gpio-ranges
GPIO ranges handled:
0: 1000b000.pinctrl GPIOS [232 - 511] PINS [0 - 279]
okay. the base is 232.
step 2. rebase for gpio 206. followlingly we will operate on the result got from 206 + 232 the base we got in the previous step.
echo 438 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio438/direction
echo 1 > /sys/class/gpio/gpio438/value
echo 0 > /sys/class/gpio/gpio438/value
I don’t test every pin exported, but the pin 206 with previous steps seems working well through measuring the voltage on the pin
I try that,thank you again. How about “special gpios” which needs register-change in 4.4.70 https://github.com/BPI-SINOVOIP/BPI-R2-bsp/issues/11#issuecomment-326988062
Same in 4.14?
Then i only need the internal wlan-card,where driver is testing in 4.4…
@Ryder.Lee can you make a pull-request to mainline-repo for sd-patch?
I have a lot on my plate, could you help to send a pull-request?
Hi, Frank
the dedicated operation on special gpios should be not required based on below code snippet is ready, which would be done when pimux setup involved such gpio request from userspace or kernel space or driver initial pinctrl setup, but I don’t verify it on my board. You could have a try with upstream kernel.
drivers/pinctrl/mediatek/pinctrl-mt2701.c
static void mt2701_spec_pinmux_set(struct regmap *reg, unsigned int pin,
unsigned int mode)
{
unsigned int i, value, mask;
unsigned int info_num = ARRAY_SIZE(mt2701_spec_pinmux);
unsigned int spec_flag;
for (i = 0; i < info_num; i++) {
if (pin == mt2701_spec_pinmux[i].pin)
break;
}
if (i == info_num)
return;
spec_flag = (mode >> 3);
mask = BIT(mt2701_spec_pinmux[i].bit);
if (!spec_flag)
value = mask;
else
value = 0;
regmap_update_bits(reg, mt2701_spec_pinmux[i].offset, mask, value);
}
which would be called on mtk_pmx_set_mode()
seems that GPIO_SYSFS is not enough:
# cat /sys/kernel/debug/pinctrl/1000b000.pinctrl/gpio-ranges
cat: can't open '/sys/kernel/debug/pinctrl/1000b000.pinctrl/gpio-ranges': No such file or directory
# ls /sys/kernel/
config kexec_crash_loaded rcu_expedited uevent_seqnum
debug kexec_crash_size rcu_normal vmcoreinfo
fscaps kexec_loaded slab
iommu_groups mm tracing
irq notes uevent_helper
# ls /sys/kernel/debug/
#
frank@Frank-Laptop:/media/data_ext/kernel_4.14/linux$ grep 'GPIO\|PINCTRL' .config
CONFIG_ARCH_NR_GPIO=0
# CONFIG_MDIO_BUS_MUX_GPIO is not set
# CONFIG_KEYBOARD_GPIO is not set
# CONFIG_KEYBOARD_GPIO_POLLED is not set
# CONFIG_MOUSE_GPIO is not set
# CONFIG_SERIO_GPIO_PS2 is not set
# CONFIG_I2C_CBUS_GPIO is not set
# CONFIG_I2C_GPIO is not set
CONFIG_PINCTRL=y
# CONFIG_DEBUG_PINCTRL is not set
# CONFIG_PINCTRL_AMD is not set
# CONFIG_PINCTRL_MCP23S08 is not set
# CONFIG_PINCTRL_SINGLE is not set
# CONFIG_PINCTRL_SX150X is not set
CONFIG_PINCTRL_MTK=y
CONFIG_PINCTRL_MT2701=y
# CONFIG_PINCTRL_MT6397 is not set
CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
CONFIG_GPIOLIB=y
CONFIG_OF_GPIO=y
# CONFIG_DEBUG_GPIO is not set
CONFIG_GPIO_SYSFS=y
# Memory mapped GPIO drivers
# CONFIG_GPIO_74XX_MMIO is not set
# CONFIG_GPIO_ALTERA is not set
# CONFIG_GPIO_DWAPB is not set
# CONFIG_GPIO_EXAR is not set
# CONFIG_GPIO_FTGPIO010 is not set
# CONFIG_GPIO_GENERIC_PLATFORM is not set
# CONFIG_GPIO_GRGPIO is not set
# CONFIG_GPIO_MOCKUP is not set
# CONFIG_GPIO_MPC8XXX is not set
# CONFIG_GPIO_SYSCON is not set
# CONFIG_GPIO_XILINX is not set
# CONFIG_GPIO_ZEVIO is not set
# I2C GPIO expanders
# CONFIG_GPIO_ADP5588 is not set
# CONFIG_GPIO_ADNP is not set
# CONFIG_GPIO_MAX7300 is not set
# CONFIG_GPIO_MAX732X is not set
# CONFIG_GPIO_PCA953X is not set
# CONFIG_GPIO_PCF857X is not set
# CONFIG_GPIO_SX150X is not set
# CONFIG_GPIO_TPIC2810 is not set
# MFD GPIO expanders
# CONFIG_HTC_EGPIO is not set
# PCI GPIO expanders
# CONFIG_GPIO_BT8XX is not set
# CONFIG_GPIO_PCI_IDIO_16 is not set
# CONFIG_GPIO_RDC321X is not set
# USB GPIO expanders
# CONFIG_GPIO_WATCHDOG is not set
# CONFIG_REGULATOR_GPIO is not set
# CONFIG_IR_GPIO_CIR is not set
CONFIG_USB_GPIO_VBUS=y
CONFIG_LEDS_GPIO=y
# CONFIG_LEDS_TRIGGER_GPIO is not set
# CONFIG_EXTCON_GPIO is not set
# CONFIG_EXTCON_USB_GPIO is not set
CONFIG_TRACING_EVENTS_GPIO=y
as your path is /sys/kernel/debug, i assume that CONFIG_DEBUG_GPIO must be also enabled, right? => is also not enough
The entry should be added when CONFIG_DEBUG_FS is enabled
CONFIG_DEBUG_FS is enabled…
14.4.boot.log (29,7 KB)
my.config (100,8 KB)
of course i removed my entries in pinctrl/mediatek/Makefile and Kconfig and made a “make clean”
maybe you can post your .config for compare
please mount debugfs before you cat something from it
just by
mount -t debugfs none /sys/kernel/debug
OK, i didn’t work with debugfs before, sorry for the dumb question…of course it must be mounted
as for my example in my wiki, i use pin 14(-)/16 (+) = GPIO 25
# echo $((232+25)) > /sys/class/gpio/export
# echo out > /sys/class/gpio/gpio$((232+25))/direction
# echo 1 > /sys/class/gpio/gpio$((232+25))/value
LED is ON!!
i can confirm that memory-Hack is not needed (Pin12=GPIO24):
# GPIO_NO=$((232+24))
# echo $GPIO_NO > /sys/class/gpio/export
# echo out > /sys/class/gpio/gpio${GPIO_NO}/direction
# echo 1 > /sys/class/gpio/gpio${GPIO_NO}/value
short question regarding mmc…how can i mount it? it does not create a device in /dev…i can see it in /proc/partitons and /sys/devices/platform/11240000.mmc/, but found no block-device for mounting. searched a bit around…
CONFIG_MMC_BLOCK=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
are set…or must the device created by udev (maybe not included in my ramdisk)
i tried to create them manually, but failed
# cat /proc/partitions
major minor #blocks name
179 0 7634944 mmcblk0
179 24 512 mmcblk0rpmb
179 16 4096 mmcblk0boot1
179 8 4096 mmcblk0boot0
179 32 7974912 mmcblk1
179 33 262144 mmcblk1p1
179 34 7270400 mmcblk1p2
# mknod /dev/mmcblk1 b 179 32
# mknod /dev/mmcblk1p1 b 179 33
# mknod /dev/mmcblk1p2 b 179 34
#
# mount /dev/mmcblk1p1 /mnt
mount: mounting /dev/mmcblk1p1 on /mnt failed: Invalid argument
seems, that FS must be set, too (works for p2 not for p1,tried with vfat,fat,fat16,fat32)
# mount -t ext4 /dev/mmcblk1p2 /mnt
[ 6254.297674] EXT4-fs (mmcblk1p2): warning: mounting unchecked fs, running e2fsck is recommended
[ 6254.318748] EXT4-fs (mmcblk1p2): mounted filesystem without journal. Opts: (null)
# ls /mnt
bin etc lost+found opt run srv tmp
boot home media proc sbin sys usr
dev lib mnt root selinux system var
ok, that should be the reason (because i’m still using ramfs as root, there are no modules):
frank@Frank-Laptop:/media/data_ext/kernel_4.14/linux$ grep 'VFAT' .config
CONFIG_VFAT_FS=m
frank@Frank-Laptop:/media/data_ext/kernel_4.14/linux$ grep 'EXT4' .config
CONFIG_EXT4_FS=y
after making vfat fixed in kernel i’ve got this:
# mount -t vfat /dev/mmcblk1p1 /mnt
[ 87.055989] FAT-fs (mmcblk1p1): codepage cp437 not found
mount: mounting /dev/mmcblk1p1 on /mnt failed: Invalid argument
i think this is because the config
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_NLS_CODEPAGE_437=m
CONFIG_NLS_ISO8859_1=m
setting these m to y i can successful mount BPI-BOOT
# mknod /dev/mmcblk1p1 b 179 33
# mount /dev/mmcblk1p1 /mnt
[ 99.768645] FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
# ls /mnt
bananapi uEnv.txt
now i try to disable ramdisk and use bootloder cmdline:
goodman48 login: root
# cat /proc/cmdline
board=bpi-r2 console=earlyprintk console=tty1 fbcon=map:0 console=ttyS0,115200 root=/dev/mmcblk1p2 rootfstype=ext4 rootwait service=0
#
cmdline looks correct, but it was booted to ramdisk
frank@Frank-Laptop:/media/data_ext/kernel_4.14/linux$ grep 'RAMFS\|CMDLINE' .config
CONFIG_INITRAMFS_SOURCE="../rootfs_ttys0_rng.cpio.gz"
CONFIG_INITRAMFS_ROOT_UID=0
CONFIG_INITRAMFS_ROOT_GID=0
CONFIG_INITRAMFS_COMPRESSION=".gz"
CONFIG_BLK_CMDLINE_PARSER=y
CONFIG_CMDLINE_PARTITION=y
CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set
CONFIG_CMDLINE="earlyprintk console=ttyS0,115200 vmalloc=496M debug=7 loglevel=8 no_console_suspend"
CONFIG_CMDLINE_FROM_BOOTLOADER=y
# CONFIG_CMDLINE_EXTEND is not set
# CONFIG_CMDLINE_FORCE is not set
# CONFIG_MTD_CMDLINE_PARTS is not set
# CONFIG_CRAMFS is not set
removed the CONFIG_INITRAMFS_SOURCE and now it tries to boot from SD-Card, but fails loading init
[ 1.758553] Freeing unused kernel memory: 1024K
[ 1.805009] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module binfmt-464c, throttling...
[ 6.872446] request_module: modprobe binfmt-464c cannot be processed, kmod busy with 50 threads for more than 5 seconds now
[ 6.886616] Starting init: /sbin/init exists but couldn't execute it (error -8)
[ 6.910835] Starting init: /etc/init exists but couldn't execute it (error -13)
[ 6.926854] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module binfmt-464c, throttling...
[ 11.992432] request_module: modprobe binfmt-464c cannot be processed, kmod busy with 50 threads for more than 5 seconds now
[ 12.006612] Starting init: /bin/sh exists but couldn't execute it (error -8)
[ 12.024728] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst.
it’s a debian jessie where /sbin/init is a symlink to /lib/systemd/systemd…is a additional kernel-module needed for that?
file /media/frank/BPI-ROOT/lib/systemd/systemd
/media/frank/BPI-ROOT/lib/systemd/systemd: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=e8dd34610703fa7966ae24f424ccb4e6eb464a8c, stripped
ELF-Support is included in kernel
Symbol: BINFMT_ELF [=y]
Type : boolean
Prompt: Kernel support for ELF binaries
Filesystem boots well with 4.4.70…so nothing is corrupt…something is missing in 4.14 kernel
4.14.sd-boot.log (42,6 KB)
googled around but found nothing specific, only that the errorcode stands for ENOEXEC
#define ENOEXEC 8 /* Exec format error */
maybe this is a solution:
https://groups.google.com/forum/#!topic/linux.kernel/NibC_s8YpdQ (patch not included in 4.14 fs/exec.c:1655 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/exec.c?h=v4.14 )
same error after patch (only without the 2 Line begin with request_module)…any idea?
You got any repo with this patches?