Suspend/Wakeup in Beagleboard using Angstrom - linux-kernel

I want to suspend and resume my Beagleboard C4.
I checked out the latest Angstrom kernel using,
git clone git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git linux-omap-2.6
But the kernel is not booting properly. It is stuck at
[ 4.755645] EXT3-fs (mmcblk0p2): recovery complete
[ 4.991027] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
[ 4.999023] VFS: Mounted root (ext3 filesystem) readonly on device 179:2.
[ 5.006652] Freeing init memory: 304K
[ 6.316253] EXT3-fs (mmcblk0p2): using internal journal
Has anyone resolved this issue?
I compiled the kernel directly on the beagleboard. Same result.
I compiled the kernel using toolchain. Same result.
Is it something related to the u-boot/File system?

Related

PXE boot fail with kernel panic: Unable to mount root fs

I am having an issue on some servers since some time, and fail to find the issue.
These are x86_64 server, with Intel Xeon, configured to boot in UEFI over network, through an iPXE rom.
Kernel and initramfs are the ones from Centos 8 (tried 8.0 and 8.2).
But when booting, I always end up with (on every servers, so should not be related to an hardware failure):
[ 5.542304] hid-generic 0003:0557:2221.0002: input,hidraw1: USB HID v1.00 Keyboard [Winbond Electronics Corp Hermon USB hidmouse Device] on usb-0000:00:1a.0-1.3/input1
[ 5.599611] rtc_cmos 00:02: setting system clock to 2020-06-26 19:21:43 UTC (1593199303)
[ 5.620965] md: Waiting for all devices to be available before autodetect
[ 5.640580] md: If you don't use raid, use raid=noautodetect
[ 5.659949] md: Autodetecting RAID arrays.
[ 5.676869] md: autorun ...
[ 5.691838] md: ... autorun DONE.
[ 5.707883] List of all partitions:
[ 5.723667] No filesystem could mount root, tried:
[ 5.723667]
[ 5.754724] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 5.775237] CPU: 9 PID: 1 Comm: swapper/0 Not tainted 4.18.0-193.6.3.el8_2.x86_64 #1
[ 5.815778] Call Trace:
[ 5.830360] dump_stack+0x5c/0x80
[ 5.845920] panic+0xe7/0x2a9
[ 5.860995] mount_block_root+0x2c5/0x2e9
[ 5.877407] ? do_early_param+0x91/0x91
[ 5.892617] prepare_namespace+0x135/0x16b
[ 5.907676] kernel_init_freeable+0x22e/0x258
[ 5.922607] ? rest_init+0xaa/0xaa
[ 5.937398] kernel_init+0xa/0xff
[ 5.950991] ret_from_fork+0x35/0x40
[ 5.964572] Kernel Offset: 0x2ca00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[ 6.000387] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---
The iPXE boot script is:
#!ipxe
kernel http://10.10.0.1/vmlinuz-4.18.0-193.6.3.el8_2.x86_64 initrd=initramfs-4.18.0-193.6.3.el8_2.x86_64.img selinux=0 rd.shell rd.debug root=live:http://10.10.0.1/squashfs.img rw console=tty0 console=ttyS1,115200
initrd http://10.10.0.1/initramfs-4.18.0-193.6.3.el8_2.x86_64.img
boot
Which generate this in the console:
http://10.10.0.1/vmlinuz-4.18.0-193.6.3.el8_2.x86_64... ok
http://10.10.0.1/initramfs-4.18.0-193.6.3.el8_2.x86_64.img... ok
INTEL 0x6f080f70 MAC reset (081c0261/80280783 was 081c0261/80280783)
INTEL 0x6f080f70 MAC reset (081c0261/80280783 was 081c0261/80280783)
INTEL 0x6f081ab0 MAC reset (081c0261/80280787 was 081c0261/80280787)
[ 0.000000] Linux version 4.18.0-193.6.3.el8_2.x86_64 (mockbuild#kbuilder.bsys.centos.org) (gcc version 8.3.1 20191121 (Red Hat 8.3.1-5) (GCC)) #1 SMP Wed Jun 10 11:09:32 UTC 2020
[ 0.000000] Command line: vmlinuz-4.18.0-193.6.3.el8_2.x86_64 initrd=initramfs-4.18.0-193.6.3.el8_2.x86_64.img selinux=0 rd.shell rd.debug root=live:http://10.10.0.1/squashfs.img rw console=tty0 console=ttyS1,115200
...
On the server side, on apache logs I have:
10.10.2.1 - - [26/Jun/2020:19:55:42 +0200] "GET /vmlinuz-4.18.0-193.6.3.el8_2.x86_64 HTTP/1.1" 200 8913656 "-" "iPXE/1.0.0+"
10.10.2.1 - - [26/Jun/2020:19:55:42 +0200] "GET /initramfs-4.18.0-193.6.3.el8_2.x86_64.img HTTP/1.1" 200 53703611 "-" "iPXE/1.0.0+"
So it seems to be working perfectly.
This is diskless boot here, but whatever I try (kickstart diskfull install, or even kernel+initrd alone) I always end up to this kernel panic...
I tried to reset BIOS settings, try to boot in legacy/pcbios instead of UEFI, tried to desactivate sata disks, etc. Always this same error. Also tried to use kernel+initrd from Centos ISO (checked checksum), tried to use the ones from my management node. Nothing. Do I miss something obvious?
Does any of you have an idea or already faced this kind of issue?
Many thanks in advance :-)
With my best regards
Beuk

Qemu Freescale i.MX6 DualLite SABRE : root filesystem does not mount

Goal: emulate the "sabrelite : Freescale i.MX6 Quad SABRE Lite Board (Cortex A9)" that Qemu specifically supports (doing 'qemu-system-arm -M ?' it shows up).
Qemu ver: 2.10.1 (host: fedora-27).
I have successfully cross-compiled and built a 4.1.46 Linux kernel (used the imx_v6_v7_defconfig config file) as well as a simple "skeleton" root filesystem (busybox-based). (FYI, I have a similar working setup for the ARM Cortex-A9 Versatile Express platform - I do this using my own home-spun embedded Linux system called SEALS).
Looking at the U-Boot config file used by similar boards, I figured to use 'root=/dev/mmcblk0p0' as the root= param for the kernel.
So, to try it out I then run qemu as follows (pl scroll horizontally as well to see):
qemu-system-arm -m 512 -M sabrelite -kernel zImage -drive file=rfs.img,format=raw -append "console=ttymxc0 rootfstype=ext4 root=/dev/mmcblk0p0 rw rootwait init=/sbin/init " -nographic -dtb imx6dl-sabresd.dtb
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.1.46 (kai#klaptop) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29) ) #2 SMP Mon Nov 27 17:16:22 IST 2017
[ 0.000000] CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[ 0.000000] Machine model: Freescale i.MX6 DualLite SABRE Smart Device Board
[ 0.000000] cma: Reserved 16 MiB at 0x2f000000
[...]
So it starts to boot up just fine. But then:
[...]
[ 2.210965] /soc/aips-bus#02100000/usdhc#02194000: voltage-ranges unspecified
[ 2.211796] sdhci-esdhc-imx 2194000.usdhc: Got CD GPIO
[ 2.212199] sdhci-esdhc-imx 2194000.usdhc: Got WP GPIO
[ 2.214392] sdhci-esdhc-imx 2194000.usdhc: could not get ultra high speed state, work on normal mode
[ 2.218084] sdhci-esdhc-imx 2194000.usdhc: No vmmc regulator found
[ 2.218367] sdhci-esdhc-imx 2194000.usdhc: No vqmmc regulator found
[ 2.265431] mmc0: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
[ 2.267300] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
[ 2.281912] /soc/aips-bus#02100000/usdhc#02198000: voltage-ranges unspecified
[ 2.282956] sdhci-esdhc-imx 2198000.usdhc: Got CD GPIO
[ 2.283703] sdhci-esdhc-imx 2198000.usdhc: Got WP GPIO
[ 2.284044] sdhci-esdhc-imx 2198000.usdhc: could not get ultra high speed state, work on normal mode
[ 2.284892] sdhci-esdhc-imx 2198000.usdhc: No vmmc regulator found
[ 2.285167] sdhci-esdhc-imx 2198000.usdhc: No vqmmc regulator found
[ 2.298029] mmc0: mmc_rescan_try_freq: trying to init card at 300000 Hz
[ 2.337904] mmc1: SDHCI controller on 2198000.usdhc [2198000.usdhc] using ADMA
[ 2.357051] /soc/aips-bus#02100000/usdhc#0219c000: voltage-ranges unspecified
[ 2.358313] sdhci-esdhc-imx 219c000.usdhc: No vmmc regulator found
[ 2.358642] sdhci-esdhc-imx 219c000.usdhc: No vqmmc regulator found
[ 2.368204] mmc0: mmc_rescan_try_freq: trying to init card at 200000 Hz
[ 2.414722] mmc2: SDHCI controller on 219c000.usdhc [219c000.usdhc] using ADMA
[ 2.440456] mmc0: mmc_rescan_try_freq: trying to init card at 100000 Hz
[...]
[ 2.986441] No soundcards found.
[ 3.007698] Waiting for root device /dev/mmcblk0p0...
Keeps waiting forever here ...
I understand that, on an actual physical board, one would have to "format" or partition the MMC (or SD) card, and have u-boot load up the kernel and rootfs into RAM. But am currently interested in getting the IMX6 working on Qemu...
So, my actual question: how can I get the root filesystem mounted and operational on Qemu?
Any help appreciated! TIA,
There are two problems here. Firstly, your command line isn't actually creating an SD card: the -drive option creates a drive object but doesn't try to plug it in anywhere (because the sabrelite board doesn't define a "default kind of block drive"). To actually plug in the drive to an emulated sd card you need
-drive file=yourfile.img,format=raw,id=mycard -device sd-card,drive=mycard
Secondly, there are bugs in QEMU's current imx6 sd controller emulation, because if you do that then the guest kernel continuously prints
[ 28.971663] mmc1: Timeout waiting for hardware interrupt.
[ 28.973619] mmc1: error -110 whilst initialising SD card
...so it has found the emulated card but isn't getting an interrupt it expects.
These can be fixed by a patch currently on the qemu-devel mailing lists and going through code review: http://patchwork.ozlabs.org/patch/834805/ plus a simple change to hw/arm/fsl-imx6.c to make it create TYPE_IMX_USDHC devices rather than TYPE_SYSBUS_SDHCI. (Basically the imx6's SD controller isn't a completely standard compatible sdhci controller but what we were creating in the QEMU model was the plain variety.)
If you do all that then you can boot a kernel that can see the mmc card:
[ 8.878283] mmc1: new SD card at address 4567
[ 8.910566] mmcblk0: mmc1:4567 QEMU! 256 MiB
With a little luck we'll be able to have this fixed in the 2.12 release of QEMU, which will be out in some time in spring 2018.
Edit as of 9 Mar 2018 -- the relevant fixes are now in QEMU master (commits fd1e5c81796, df2a5cf4c8) and will be in 2.12.

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

What would cause 'fdt: not creating '/sys/firmware/fdt': CRC check failed' during boot?

I am booting a pre-built FIT image from a vendor's SDK (NXP SDK2.0) on an ARM reference platform (ls1046ardb). This .itb image contains 'kernel#1', 'fdt#1', and 'ramdisk#1'.
During boot I see a CRC check failure on the FDT. Is this failure common and expected? Although it's always possible, I wouldn't expect a vendor's pre-built images to be corrupted.
[ 3.600660] fsl_generic: FSL DPAA Generic Ethernet driver
[ 3.606246] rtc-pcf2127 1-0051: pcf2127_get_datetime: read error
[ 3.612256] rtc-pcf2127 1-0051: hctosys: unable to read the hardware clock
[ 3.619213] fdt: not creating '/sys/firmware/fdt': CRC check failed
[ 3.625868] RAMDISK: gzip image found at block 0
[ 4.508215] VFS: Mounted root (ext2 filesystem) readonly on device 1:0.
[ 4.514883] devtmpfs: mounted
The boot command (from u-boot) is,
kernel_load=0xa0000000
ext2load mmc 0 $kernel_load kernel.itb
bootm $kernel_load
Any help would be appreciated. I don't see many references to this type of error on the net.

How can I configure yocto to compile linaro eglibc for kernel 3.10.0

I'm working on a bsp layer for SBC Pine64 and my image is successfully generated but I'm getting "FATAL: kernel too old" when booting init
from busybox. I've checked my busybox binary and it's being compiled for kernel 3.14.0.
My kernel is version 3.10 and I've used Linaro 5.3 toolchain. I've tried adding: OLDEST_KERNEL = "3.10.0" and I've also tried using Linaro 4.9 but I
still get the same error. I'm using yocto Krogoth and generating core-image-minial. Please, see below a snip of the error from boot log:
[13.068932] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[13.086717] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[13.112988] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[13.127040] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[13.143393] devtmpfs: mounted
[13.151972] Freeing unused kernel memory: 520K (ffffffc0009e4000 - ffffffc000a66000)
FATAL: kernel too old
[13.198566] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[13.198566]
[13.218884] CPU: 2 PID: 1 Comm: init Not tainted 3.10.102-pine64 #1
[13.230876] Call trace:
How can I configure yocto to compile linaro eglibc for kernel 3.10.0?
Thx,
Montez
When you want to override an existing variable that is not "soft-assigned", which is to say does not use the ?= syntax but instead = syntax, you need to use one of the variables in OVERRIDES as part of changing the value. You can see how overrides work already as in conf/bitbake.conf we have:
##################################################################
# Kernel info.
##################################################################
OLDEST_KERNEL = "3.2.0"
OLDEST_KERNEL_aarch64 = "3.14"
OLDEST_KERNEL_nios2 = "3.19"
And aarch64 is already found in your overrides list. Fortunately there are other values in that list, and when evaluating variables the ones later in the list in OVERRIDES take precedence. So in your local.conf you can do:
OLDEST_KERNEL_forcevariable = "3.10"
And then confirm that it has taken effect:
$ bitbake -e busybox | grep -E ^OLDEST_KERNEL=
OLDEST_KERNEL="3.10"

Resources