embedded-linux

What is the use of GFP_USER flag in kmalloc?

孤人 提交于 2019-12-30 11:28:05
问题 As far as I understand, the use in the GFP_USER flag (in the call to kmalloc ) is used to allocate memory for user space. Does it means that the allocated page are in kernel space, which are accessible to user? Does these pages required to be mmapp 'ed in user space or the address is directly accessible to user. If they need to mmapp then what is difference between GFP_USER and GFP_KERNEL ? 回答1: Brief explanation can be found in kernel sources: GFP_KERNEL is typical for kernel-internal

When we use irq_set_chained_handler the irq line will be disabled or not?

半腔热情 提交于 2019-12-28 18:51:13
问题 When we use irq_set_chained_handler the irq line will not be disabled or not, when we are servicing the associated handler, as in case of request_irq. 回答1: It doesn't matter how the interrupt was setup. When any interrupt occurred, all interrupts (for this CPU) will be disabled during the interrupt handler. For example, on ARM architecture first place in C code where interrupt handling is found is asm_do_IRQ() function (defined in arch/arm/kernel/irq.c ). It's being called from assembler code

Error while unmounting mmcblk1p1 on beaglebone black - during repartitioning and formatting

久未见 提交于 2019-12-25 19:09:48
问题 Hi I'm a newbie of embeded linux. I'm following this tutorial (https://e2e.ti.com/support/embedded/linux/f/354/t/398780?Script-to-Erase-Emmc-independently-Beagle-Bone-Black) for flashing my linux system to beaglebone eMMC. But I have an error: umount: can't umount /dev/mmcblk1p1: Invalid argument This is my cmd : Disk /dev/mmcblk1: 3825 MB, 3825205248 bytes 4 heads, 16 sectors/track, 116736 cylinders Units = cylinders of 64 * 512 = 32768 bytes Device Boot Start End Blocks Id System /dev

Custom Linux distro - mono runtime not found

眉间皱痕 提交于 2019-12-25 05:32:51
问题 I am trying to add mono to core-image-minimal for P202RDB custom Linux distro. Here is my bblayers.conf file: # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf # changes incompatibly LCONF_VERSION = "6" BBPATH = "${TOPDIR}" BBFILES ?= "" BBLAYERS ?= " \ /home/testuser/QorIQ-SDK-V1.9-20151210-yocto/sources/poky/meta \ /home/testuser/QorIQ-SDK-V1.9-20151210-yocto/sources/poky/meta-yocto \ /home/testuser/QorIQ-SDK-V1.9-20151210-yocto/sources/poky/meta-yocto-bsp \ /home

Registering Platform Device with info from Device Tree

流过昼夜 提交于 2019-12-25 05:05:48
问题 I am using Petalinux for a Xilinx Zynq application, and I am new to kernel driver development. I created a kernel module for a platform driver for an AXI FIFO interface. The devices seems to be recognised from the device tree using the .of_match_table, since I can see the correct memory space reserved with cat /proc/iomem . If I search for the driver name xxx I get ./lib/modules/4.4.0-xilinx/extra/xxx.ko ./sys/bus/platform/drivers/xxx ./sys/module/xxx ./sys/module/xxx/drivers/platform:xxx I

open file fail(-1) with different flag settings

不打扰是莪最后的温柔 提交于 2019-12-25 03:14:29
问题 I have a question about using open() with different flags in Native android. Because i want to open a file and ignore the cache& buffer, in oder to access the hardware(SD card) directly. If the flag setting is O_CREAT | O_RDWR | O_NDELAY, S_IRUSR | S_IWUSR| O_DIRECT | O_SYNC . I can got a positive file descriptor(fd). But if I change the setting to O_CREAT | O_RDWR | S_IRUSR | S_IWUSR| O_DIRECT | O_SYNC the result is fail(-1). 回答1: If the flag setting is O_CREAT | O_RDWR | O_NDELAY, S_IRUSR |

UBI layout volume not found

落花浮王杯 提交于 2019-12-25 01:44:34
问题 I am following Bootlin's embedded Linux training which aims to put an embedded Linux system on an Atmel SAMA5D4 Xplained board (theory slides, practical lab instructions) and I am stuck a putting the whole system on the NAND flash. They ask me to put the DTB, the kernel, the root filesystem and a data filesystem in a UBI image to be written to the flash but I cannot access the UBI partitions once I flashed it (the access fails with error code 22, or -22 in an embedded Linux environment).

Buildroot - System doesn't boot - /dev/ttyS0 no such file

北战南征 提交于 2019-12-25 00:52:50
问题 I m using buildroot to create a filesystem for a Raspberry Pi. I have uncompressed the filesystem image in the Root partition of my SD card but I can't boot the operative system. I get the following errors: Can't open /dev/null no such file or directory Can't open /dev/ttyS0 no such file or directory Which line of the configuration tool should I enable or modify in order to boot the system? EDIT I've followed the steps provided by Thomas Petazzoni and used a preconfigured version of buildroot

When we build a kernel and busy box, we need toolchain only for busybox not for kernel?

不羁的心 提交于 2019-12-24 21:44:54
问题 Am I correct that while making a small linux system for an embedded device, we need kernel build based on the configuration set with the default toolchain. Whereas rootfs requires a toolchain ? Since the architecture is set in kernel there is no need of toolchains. Whereas the busy box makes a binary. Thus, it needs a toolchain. Please correct me as i have a doubt here. 回答1: Toolchain plays very important role in embedded system development. In compiling and building also you required cross