Tiny Core Linux
Tiny Core Base => Corepure64 => Topic started by: archieb0ld on November 08, 2018, 08:58:23 AM
-
I'm trying to dual-boot Ubuntu and Tinycore on a GPD Pocket which only has eMMC storage. I can boot TC without a problem, but I cannot mount /dev/mmcblk0 because TC can't see it. I see that mmc_core module is loaded on boot, but after digging around the net, I also tried to modprobe mmc_block, but that didn't help. Any suggestions? Any other modules I need to load maybe?
My grub2 config looks like this:
menuentry "TC9" {
linux /boot/tcvmlinuz64 quiet multivt showapps tz=EET-2EEST laptop
initrd /boot/corepure64.gz /boot/modules64.gz
}
I also thought about giving x86 CorePlus a try to have a full GUI environment out of the box, but for some reason it only boots to CLI. The corresponding grub2 entry is:
menuentry "TC9 x86" {
set isofile="/home/user/TinyCore-current.iso"
loopback loop $isofile
linux (loop)/boot/vmlinuz findiso=${isofile} quiet
initrd (loop)/boot/core.gz
}
-
Hi archieb0ld
What are the results of these commands:
dmesg | grep mmc
fdisk -l
-
on a working ubuntu system:
dmesg | grep mmc
[ 2.993886] mmc0: SDHCI controller on ACPI [80860F14:00] using ADMA
[ 3.013047] mmc1: SDHCI controller on ACPI [80860F14:01] using ADMA
[ 3.104179] mmc0: new HS200 MMC card at address 0001
[ 3.108585] mmcblk0: mmc0:0001 DJNB4R 116 GiB
[ 3.109025] mmcblk0boot0: mmc0:0001 DJNB4R partition 1 4.00 MiB
[ 3.110116] mmcblk0boot1: mmc0:0001 DJNB4R partition 2 4.00 MiB
[ 3.110288] mmcblk0rpmb: mmc0:0001 DJNB4R partition 3 4.00 MiB, chardev (243:0)
[ 3.112916] mmcblk0: p1 p2 p3 p4 p5
[ 4.264296] EXT4-fs (mmcblk0p5): mounted filesystem with ordered data mode. Opts: (null)
[ 4.859096] EXT4-fs (mmcblk0p5): re-mounted. Opts: errors=remount-ro
sudo fdisk -l
Disk /dev/mmcblk0: 116,5 GiB, 125069950976 bytes, 244277248 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: 5C568493-45BD-4CB4-8DBA-6640B7144464
Device Start End Sectors Size Type
/dev/mmcblk0p1 2048 206847 204800 100M EFI System
/dev/mmcblk0p2 206848 239615 32768 16M Microsoft reserved
/dev/mmcblk0p3 239616 67348479 67108864 32G Microsoft basic data
/dev/mmcblk0p4 242636800 244275199 1638400 800M Windows recovery environment
/dev/mmcblk0p5 67348480 242636799 175288320 83,6G Linux filesystem
Partition table entries are not in disk order.
Disk /dev/mmcblk0boot1: 4 MiB, 4194304 bytes, 8192 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
Disk /dev/mmcblk0boot0: 4 MiB, 4194304 bytes, 8192 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
On TC both return nothing
-
Hi archieb0ld
Maybe try running this on your Ubuntu system:
lsmod | grep mmc
to see which modules are needed.
I also noticed this:
Device Start End Sectors Size Type
/dev/mmcblk0p1 2048 206847 204800 100M EFI System
I don't know anything about EFI so I don't know if that would cause any problems.
-
Hi archieb0ld
Post the result of this from your Ubuntu system:
lsmod
because you may require some modules not containing mmc like sdhci.
-
Hi archieb0ld
Just a guess on my part, but based on your dmesg result, you may need to modprobe sdhci-acpi.
-
[...]
I also thought about giving x86 CorePlus a try to have a full GUI environment out of the box, but for some reason it only boots to CLI. The corresponding grub2 entry is:
menuentry "TC9 x86" {
set isofile="/home/user/TinyCore-current.iso"
loopback loop $isofile
linux (loop)/boot/vmlinuz findiso=${isofile} quiet
initrd (loop)/boot/core.gz
}
Changefindiso=${isofile}
to justiso=${isofile}
-
Hi archieb0ld
Post the result of this from your Ubuntu system:
lsmod
because you may require some modules not containing mmc like sdhci.
I checked sdhci modules, they are loaded in TC as well
lsmod ubuntu:
Module Size Used by
rfcomm 77824 12
cmac 16384 1
bnep 20480 2
nls_iso8859_1 16384 1
input_leds 16384 0
fusb302 28672 0
tcpm 45056 1 fusb302
typec 24576 1 tcpm
max17042_battery 20480 0
snd_soc_sst_cht_bsw_rt5645 20480 0
joydev 24576 0
gpio_keys 20480 0
intel_rapl 20480 0
intel_powerclamp 16384 0
coretemp 16384 0
kvm_intel 212992 0
kvm 598016 1 kvm_intel
irqbypass 16384 1 kvm
punit_atom_debug 16384 0
crct10dif_pclmul 16384 0
crc32_pclmul 16384 0
ghash_clmulni_intel 16384 0
brcmfmac 315392 0
pcbc 16384 0
brcmutil 16384 1 brcmfmac
aesni_intel 188416 2
cfg80211 622592 1 brcmfmac
aes_x86_64 20480 1 aesni_intel
crypto_simd 16384 1 aesni_intel
glue_helper 16384 1 aesni_intel
cryptd 24576 3 crypto_simd,ghash_clmulni_intel,aesni_intel
intel_cstate 20480 0
bq24190_charger 28672 1
snd_intel_sst_acpi 16384 1
snd_intel_sst_core 53248 1 snd_intel_sst_acpi
extcon_intel_cht_wc 16384 0
snd_soc_rt5645 143360 2 snd_soc_sst_cht_bsw_rt5645
snd_soc_sst_atom_hifi2_platform 102400 3 snd_intel_sst_core
snd_soc_rl6231 16384 1 snd_soc_rt5645
snd_soc_acpi 16384 2 snd_intel_sst_acpi,snd_soc_sst_cht_bsw_rt5645
snd_soc_acpi_intel_match 20480 1 snd_intel_sst_acpi
snd_soc_core 241664 3 snd_soc_sst_atom_hifi2_platform,snd_soc_rt5645,snd_soc_sst_cht_bsw_rt5645
snd_compress 20480 1 snd_soc_core
ac97_bus 16384 1 snd_soc_core
snd_pcm_dmaengine 16384 1 snd_soc_core
snd_hdmi_lpe_audio 24576 0
shpchp 36864 0
lpc_ich 24576 0
snd_pcm 98304 6 snd_hdmi_lpe_audio,snd_soc_sst_atom_hifi2_platform,snd_soc_core,snd_soc_rt5645,snd_soc_sst_cht_bsw_rt5645,snd_pcm_dmaengine
mei_txe 20480 0
mei 90112 1 mei_txe
snd_seq_midi 16384 0
snd_seq_midi_event 16384 1 snd_seq_midi
snd_rawmidi 32768 1 snd_seq_midi
processor_thermal_device 16384 0
intel_soc_dts_iosf 16384 1 processor_thermal_device
intel_soc_pmic_bxtwc 16384 0
snd_seq 65536 2 snd_seq_midi,snd_seq_midi_event
intel_pmc_ipc 20480 1 intel_soc_pmic_bxtwc
snd_seq_device 16384 3 snd_seq,snd_seq_midi,snd_rawmidi
snd_timer 32768 2 snd_seq,snd_pcm
intel_cht_int33fe 16384 0
dw_dmac 16384 0
intel_hid 16384 0
dw_dmac_core 24576 1 dw_dmac
sparse_keymap 16384 1 intel_hid
hci_uart 106496 0
goodix 20480 0
btqca 16384 1 hci_uart
snd 81920 9 snd_seq,snd_seq_device,snd_timer,snd_compress,snd_hdmi_lpe_audio,snd_soc_sst_atom_hifi2_platform,snd_soc_core,snd_pcm,snd_rawmidi
8250_dw 16384 0
soundcore 16384 1 snd
spi_pxa2xx_platform 24576 0
mac_hid 16384 0
dptf_power 16384 0
int3406_thermal 16384 0
int3403_thermal 16384 0
int340x_thermal_zone 16384 2 int3403_thermal,processor_thermal_device
int3400_thermal 16384 0
soc_button_array 16384 0
acpi_thermal_rel 16384 1 int3400_thermal
intel_int0002_vgpio 16384 1
acpi_pad 180224 0
sch_fq_codel 20480 2
parport_pc 36864 0
ppdev 20480 0
lp 20480 0
parport 49152 3 parport_pc,lp,ppdev
ip_tables 28672 0
x_tables 40960 1 ip_tables
autofs4 40960 2
overlay 77824 0
btusb 45056 0
btrtl 16384 1 btusb
btbcm 16384 2 hci_uart,btusb
btintel 16384 2 hci_uart,btusb
bluetooth 548864 43 btrtl,btqca,btintel,hci_uart,btbcm,bnep,btusb,rfcomm
ecdh_generic 24576 2 bluetooth
hid_generic 16384 0
usbhid 49152 0
hid 118784 2 usbhid,hid_generic
mmc_block 36864 3
i915 1617920 3
i2c_algo_bit 16384 1 i915
drm_kms_helper 172032 1 i915
syscopyarea 16384 1 drm_kms_helper
sysfillrect 16384 1 drm_kms_helper
sysimgblt 16384 1 drm_kms_helper
fb_sys_fops 16384 1 drm_kms_helper
i2c_cht_wc 16384 0
drm 401408 4 drm_kms_helper,i915
video 45056 2 int3406_thermal,i915
sdhci_acpi 16384 0
pwm_lpss_platform 16384 0
sdhci 49152 1 sdhci_acpi
pwm_lpss 16384 2 pwm_lpss_platform
lsmod tc:
Module Size Used by Not tainted
cpufreq_userspace 12288 0
cpufreq_conservative 12288 0
cpufreq_powersave 12288 0
intel_cht_int33fe 12288 0
battery 16384 0
8250_dw 12288 0
sdhci_acpi 12288 0
sdhci 32768 1 sdhci_acpi
mmc_core 73728 2 sdhci_acpi,sdhci
pcspkr 12288 0
squashfs 28672 0
zstd_decompress 77824 1 squashfs
xxhash 12288 1 zstd_decompress
int3406_thermal 12288 0
video 32768 1 int3406_thermal
backlight 12288 2 int3406_thermal,video
int3403_thermal 12288 0
int3400_thermal 12288 0
acpi_thermal_rel 12288 1 int3400_thermal
processor_thermal_device 12288 0
lpc_ich 20480 0
intel_soc_dts_iosf 12288 1 processor_thermal_device
int340x_thermal_zone 12288 2 int3403_thermal,processor_thermal_device
intel_hid 12288 0
sparse_keymap 12288 1 intel_hid
mei_txe 16384 0
mei 40960 1 mei_txe
loop 20480 0
xhci_pci 12288 0
xhci_hcd 81920 1 xhci_pci
iosf_mbi 12288 2 sdhci_acpi,intel_soc_dts_iosf
-
Hi archieb0ld
I see Ubuntu has mmc_block loaded but Tinycore does not.
-
Rich, as I mentioned in my initial post, I tried to modprobe mmc_block and also ran a command to rescan the pci bus using /sys/bus/pci/rescan
-
[...]
I also thought about giving x86 CorePlus a try to have a full GUI environment out of the box, but for some reason it only boots to CLI. The corresponding grub2 entry is:
menuentry "TC9 x86" {
set isofile="/home/user/TinyCore-current.iso"
loopback loop $isofile
linux (loop)/boot/vmlinuz findiso=${isofile} quiet
initrd (loop)/boot/core.gz
}
Changefindiso=${isofile}
to justiso=${isofile}
that didn't help, still neither gui, nor /dev/mmcblk0
-
Oh, also the path must be something like
/mnt/sda1/TinyCore-current.iso
because grub doesn't know where your home is.
Has nothing to do with mmc though.
-
Also, you might need to specify the partition in grub.
for example
loopback loop (hd0,msdos1)/boot/tce-5.x/boot/${isofile}
-
I don't know anything about EFI so I don't know if that would cause any problems.
It's normal to have an efi partition to enable (u)efi booting - it behaves like a dos partition.
On my machine running tinycore, inserting an sd card into the slot causes the appropriate modules to be loaded and /dev/mmcblk0 is created automatically - there is however, another thread in the forums where a different user experiences the same problem though.
it might be worth loading the udev-extra extension in CorePure64 and/or using the boot code "waitusb=10" to see if that helps?
-
Oh, also the path must be something like
/mnt/sda1/TinyCore-current.iso
because grub doesn't know where your home is.
Has nothing to do with mmc though.
but how would you explain the fact that Tinycore still boots into the CLI without knowing where my home is? Maybe I need to specify some boot options? I've tried "vga=" and "desktop=" options, but "xsetup" is not found and neither is "startx"
-
That would seem to indicate that Xvesa and its dependencies are not loaded - they are present in the cde folder in the TinyCore iso.
-
but how would you explain the fact that Tinycore still boots into the CLI without knowing where my home is?
The boot loader loaded the kernel and initrd into memory. Linux doesn't know where it was loaded from and can't perform subsequent actions on files in that same unknown location but the essential Tiny Core system is already up and running. Scripts contained in the initrd (now in memory) search for Tiny Core specific directories (tce) on attached devices if not otherwise specified via kernel boot code. If a tce directory was found it will be used for extensions, user data etc.
-
First of all, I forgot to thank everyone who has been helping me so far.
So after banging my head against the wall last night, this is what I can say.
Going into the GRUB command line, I listed the partitions with "ls" to see if I can manually set root and load the kernel and initrd.
Grub lists the desired partition as (hd0,gpt5) and I'm able to view its contents from within GRUB console, but when loading TC it still doesn't see /dev/mmcblk
I've tried different options, including booting with "waitusb=10", setting UUID in boot options, doing "insmod" of part_gpt and gzio in GRUB (basically copying everything from Ubuntu GRUB menuentries) and even compiling the kernel for the first time (yay!) setting all MMC related options to Y, but still nothing.
I also wonder why "mmc_block" module is not loaded by default in TC while "mmc_core" is. Does anyone have a clue why?
So I assume there is still something in kernel options I might need to configure.
I did a diff between the .config used to compile Ubuntu and TC kernels. Now, I know it's a lot of text, but if anyone here has any experience compiling kernels for eMMC devices, pointing me in the right direction would be much appreciated
-
Did you try loading the udev-extra extension?
-
"lspci -vnn" on Ubuntu might tell something, look under the MMC part's "kernel driver in use" as well as the pci id.
-
Did you try loading the udev-extra extension?
we're getting closer. Now the MMC drive shows up in /dev/disk/by-uuid, but mounting it fails with error "device or resource busy". Dmesg doesn't report a new drive and fdisk doesn't list the drive
"lspci -vnn" on Ubuntu might tell something, look under the MMC part's "kernel driver in use" as well as the pci id.
no mention of MMC there, only PCI and ISA bridges
00:00.0 Host bridge [0600]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SoC Transaction Register [8086:2280] (rev 34)
Subsystem: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SoC Transaction Register [8086:7270]
Flags: bus master, fast devsel, latency 0
Kernel driver in use: iosf_mbi_pci
00:02.0 VGA compatible controller [0300]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Configuration Registers [8086:22b0] (rev 34) (prog-if 00 [VGA controller])
Subsystem: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Configuration Registers [8086:7270]
Flags: bus master, fast devsel, latency 0, IRQ 123
Memory at a0000000 (64-bit, non-prefetchable) [size=16M]
Memory at 80000000 (64-bit, prefetchable) [size=512M]
I/O ports at f000 [size=64]
[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
Capabilities: [d0] Power Management version 2
Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [b0] Vendor Specific Information: Len=07 <?>
Kernel driver in use: i915
Kernel modules: i915
00:0b.0 Signal processing controller [1180]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Power Management Controller [8086:22dc] (rev 34)
Subsystem: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Power Management Controller [8086:7270]
Flags: fast devsel, IRQ 129
Memory at a1a3b000 (64-bit, non-prefetchable) [size=4K]
Capabilities: [40] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [50] Power Management version 3
Kernel driver in use: proc_thermal
Kernel modules: processor_thermal_device
00:14.0 USB controller [0c03]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series USB xHCI Controller [8086:22b5] (rev 34) (prog-if 30 [XHCI])
Subsystem: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series USB xHCI Controller [8086:7270]
Flags: bus master, medium devsel, latency 0, IRQ 121
Memory at a1a00000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [70] Power Management version 2
Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+
Kernel driver in use: xhci_hcd
00:1a.0 Encryption controller [1080]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Trusted Execution Engine [8086:2298] (rev 34)
Subsystem: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Trusted Execution Engine [8086:7270]
Flags: bus master, fast devsel, latency 0, IRQ 128
Memory at a1900000 (32-bit, non-prefetchable) [size=1M]
Memory at a1800000 (32-bit, non-prefetchable) [size=1M]
Capabilities: [80] Power Management version 3
Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit-
Kernel driver in use: mei_txe
Kernel modules: mei_txe
00:1c.0 PCI bridge [0604]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port #1 [8086:22c8] (rev 34) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0, IRQ 117
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
Memory behind bridge: a1000000-a14fffff
Capabilities: [40] Express Root Port (Slot+), MSI 00
Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [90] Subsystem: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port [8086:7270]
Capabilities: [a0] Power Management version 3
Capabilities: [100] #00
Capabilities: [200] L1 PM Substates
Kernel driver in use: pcieport
Kernel modules: shpchp
00:1f.0 ISA bridge [0601]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCU [8086:229c] (rev 34)
Subsystem: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCU [8086:7270]
Flags: bus master, medium devsel, latency 0
Capabilities: [e0] Vendor Specific Information: Len=0c <?>
Kernel driver in use: lpc_ich
Kernel modules: lpc_ich
01:00.0 Network controller [0280]: Broadcom Limited BCM4356 802.11ac Wireless Network Adapter [14e4:43ec] (rev 02)
Subsystem: Gemtek Technology Co., Ltd BCM4356 802.11ac Wireless Network Adapter [17f9:0036]
Flags: bus master, fast devsel, latency 0, IRQ 135
Memory at a1400000 (64-bit, non-prefetchable) [size=32K]
Memory at a1000000 (64-bit, non-prefetchable) [size=4M]
Capabilities: [48] Power Management version 3
Capabilities: [58] MSI: Enable+ Count=1/16 Maskable- 64bit+
Capabilities: [68] Vendor Specific Information: Len=44 <?>
Capabilities: [ac] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [13c] Device Serial Number 00-00-38-ff-ff-00-38-0f
Capabilities: [150] Power Budgeting <?>
Capabilities: [160] Virtual Channel
Capabilities: [1b0] Latency Tolerance Reporting
Capabilities: [220] #15
Capabilities: [240] L1 PM Substates
Kernel driver in use: brcmfmac
Kernel modules: brcmfmac
now that I have tried modprobing, I see that "shpchp" is not found in modules.dep. However, is see in TC .config CONFIG_HOTPLUG_PCI_SHPC=m
I'm not sure how this modules thing works exactly, but shouldn't I be able to "modprobe shpchp"?
As a side question, should I use "corepure64.gz" or "rootfs64.gz" in GRUB? I see someone in the forum using rootfs.gz, but I have personally always used corepure.gz
-
Using the apps gui provides function shows shpchp to be provided by the pci-hotplug-KERNEL extension.
corepure64.gz = rootfs64.gz + modules64.gz
-
Did you try loading the udev-extra extension?
we're getting closer. Now the MMC drive shows up in /dev/disk/by-uuid, but mounting it fails with error "device or resource busy". Dmesg doesn't report a new drive and fdisk doesn't list the drive
Sorry for misinforming you. Upon closer inspection, it turned out that the new device that popped up in /dev/disk/by-uuid is actually a symlink to /dev/zram0, which is clearly not the eMMC device. I somehow messed up the UUID.
Tried loading pci-hotplug extension and modprobing shpchp, but still nothing.
Here's the output of blkid on Ubuntu:
/dev/mmcblk0: PTUUID="5c568493-45bd-4cb4-8dba-6640b7144464" PTTYPE="gpt"
/dev/mmcblk0p1: LABEL="SYSTEM" UUID="C4FD-2BDD" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="2c66add8-ed34-48a4-adf7-229109f6d4ea"
/dev/mmcblk0p2: PARTLABEL="Microsoft reserved partition" PARTUUID="64666d5c-f92e-4ea2-ba07-2c3754e28265"
/dev/mmcblk0p3: LABEL="Local Disk" UUID="F68A01FC8A01BA5F" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="156a4989-b15c-4889-945e-2d465ef52bb2"
/dev/mmcblk0p4: LABEL="Recovery" UUID="0A560288560274AB" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="6150f9b4-7d91-4108-9b49-6a0011ad658d"
/dev/mmcblk0p5: UUID="d553d5aa-365e-4196-aa5e-c7da105b9f94" TYPE="ext4" PARTUUID="fb088592-9a20-4515-a9e9-9111dde9ed64"
I will try reaching out to the person who initially ported Ubuntu to the GPD Pocket, but maybe there would be any other suggestions?
-
Have you loaded the pci-hotplug-KERNEL extension?
If so, is the shpchp module loaded automatically or do you need to do it manually?
-
yes, I have, and shpchp is loaded automatically. I assume there is something to do with the Broadcom chip. Maybe the eMMC drive is somehow related to the brcmfmac kernel module
-
yes, I have, and shpchp is loaded automatically. I assume there is something to do with the Broadcom chip. Maybe the eMMC drive is somehow related to the brcmfmac kernel module
couldn't edit my own reply, but I just re-checked. shpcp needs to be manually loaded, but it doesn't help anyways