UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer abdulkarim
Observer
60 Views
Registered: ‎05-04-2018

Autologin does not work in petalinux 2016.4

Hi all,

i know that there are several questions like mine but it does not work yet on my Zybo board target. Though i tried a lot of threads in this forum but something is going wrong.

I am working with Petalinux 2016.4 and Zybo board 7010. I want simply to make an Autologin for my image as described in the manual ug1144(2016.4) and i tried this https://forums.xilinx.com/t5/Embedded-Linux/Petalinux-2016-4-autologin/td-p/817119 thread step by step.

 

My configurations are:

1- In /<project_dir>/bild/conf/local.conf i added the line

EXTRA_IMAGE_FEATURES = "debug-tweaks"

2- In /<project_dir>/project-spec/meta-plnx-generated/recipes-core/images/petalinux-usr-image.bb i deleted the lines:

“inherit extrausers”

“usermod -P root root;”

3- I created a new app called autologin in recipes-apps

$ petalinux-create -t apps --template c --name myapp --enable

4- The file /<project_dir>/project-spec/meta-user/recipes-apps/autologin/autologin.bb has the content:

#
# This file is the autologin recipe.
#
SUMMARY = "Simple autologin application"
SECTION = "PETALINUX/apps"
LICENSE = "MIT"

LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "file://autologin.c \
		file://Makefile \
		file://autologin.sh \
                  "
INITSCRIPT_NAME = "autologin"
INITSCRIPT_PARAMS = "defaults"

S = "${WORKDIR}"

inherit update-rc.d

do_compile() {
		oe_runmake
}

do_install() {
		install -d ${D}${bindir}
		install -m 0755 autologin ${D}${bindir}
		install -d ${D}${sysconfdir}/init.d/
		install -m 0755 autologin.sh ${D}${sysconfdir}/init.d/autologin
}

5- Finally, /<project_dir>/project-spec/meta-user/recipes-apps/autologin/autologin/autologin.sh has the content:

#!/bin/sh
exec /bin/login -f root

but i am getting in console always the following output:

INFO: The image provided is a zImage
INFO: TCP PORT is free 
INFO: Starting arm QEMU
INFO:  qemu-system-aarch64 -M arm-generic-fdt-plnx -machine linux=on   -serial /dev/null -serial mon:stdio -display none -kernel /home/avt/Abdulkarim/PetalinuxProjects/VDMA/build/qemu_image.elf -gdb tcp::9000 -dtb /home/avt/Abdulkarim/PetalinuxProjects/VDMA/pre-built/linux/images/system.dtb  -net nic,vlan=1 -net user,vlan=1 -net nic -tftp /tftpboot -device loader,addr=0xf8000008,data=0xDF0D,data-len=4 -device loader,addr=0xf8000140,data=0x00500801,data-len=4 -device loader,addr=0xf800012c,data=0x1ed044d,data-len=4 -device loader,addr=0xf8000108,data=0x0001e008,data-len=4  
qemu-system-aarch64: -tftp /tftpboot: The -tftp option is deprecated. Please use '-netdev user,tftp=...' instead.
Warning: vlan 0 is not connected to host network
rom: requested regions overlap (rom dtb. free=0x00000000fffffff8, addr=0x0000000008000000)
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.6.0-xilinx (avt@avt-1220605-1470124) (gcc version 5.2.1 20151005 (Linaro GCC 5.2-2015.11-2) ) #2 SMP PREEMPT Mon Apr 15 11:17:00 CEST 2019
CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine model: VDMA
bootconsole [earlycon0] enabled
cma: Reserved 16 MiB at 0x3f000000
Memory policy: Data cache writealloc
percpu: Embedded 12 pages/cpu @ef7d3000 s19776 r8192 d21184 u49152
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260608
Kernel command line: console=ttyPS0,115200 earlyprintk
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1010216K/1048576K available (5286K kernel code, 230K rwdata, 1848K rodata, 5120K init, 222K bss, 21976K reserved, 16384K cma-reserved, 245760K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
    lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc07f793c   (8127 kB)
      .init : 0xc0800000 - 0xc0d00000   (5120 kB)
      .data : 0xc0d00000 - 0xc0d39ba0   ( 231 kB)
       .bss : 0xc0d39ba0 - 0xc0d713a4   ( 223 kB)
Preemptible hierarchical RCU implementation.
	Build-time adjustment of leaf fanout to 32.
	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
efuse mapped to f0802000
slcr mapped to f0804000
L2C: platform modifies aux control register: 0x00000000 -> 0x30400000
L2C: DT/platform modifies aux control register: 0x00000000 -> 0x30400000
L2C-310 errata 588369 769419 enabled
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 cache controller enabled, 8 ways, 64 kB
L2C-310: CACHE_ID 0x00000000, AUX_CTRL 0x00000000
zynq_clock_init: clkc starts at f0804100
Zynq clock init
global-timer: non support for this cpu version.
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 826992825 ns
sched_clock: 16 bits at 35kHz, resolution 28357ns, wraps every 929205421ns
timer #0 at f080c000, irq=16
Console: colour dummy device 80x30
Calibrating delay loop... 1718.68 BogoMIPS (lpj=8593408)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x100000 - 0x100058
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (2984.34 BogoMIPS).
CPU: WARNING: CPU(s) started in wrong/inconsistent modes (primary CPU mode 0x13)
CPU: This may indicate a broken bootloader or firmware.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 0
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor menu
hw-breakpoint: debug architecture 0x4 unsupported.
zynq-ocm f800c000.ocmc: can't request region for resource [mem 0x0000000c-0x0003ffff]
zynq-ocm: probe of f800c000.ocmc failed with error -16
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource ttc_clocksource
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 1 counters available
futex hash table entries: 512 (order: 3, 32768 bytes)
workingset: timestamp_bits=28 max_order=18 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
bounce: pool size: 64 pages
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac: 	DBUFF-256x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
xilinx-vdma 43000000.dma: Xilinx AXI VDMA Engine Driver Probed!!
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 142, base_baud = 992063) is a xuartps
console [ttyPS0] enabled
console [ttyPS0] enabled
bootconsole [earlycon0] disabled
bootconsole [earlycon0] disabled
xdevcfg f8007000.devcfg: ioremap 0xf8007000 to f08b0000
[drm] Initialized drm 1.1.0 20060810
brd: module loaded
loop: module loaded
m25p80 spi0.0: m25p80 (1024 Kbytes)
4 ofpart partitions found on MTD device spi0.0
Creating 4 MTD partitions on "spi0.0":
0x000000000000-0x000000500000 : "boot"
mtd: partition "boot" extends beyond the end of device "spi0.0" -- size truncated to 0x100000
0x000000500000-0x000000520000 : "bootenv"
mtd: partition "bootenv" is out of reach -- disabled
0x000000520000-0x000000fa0000 : "kernel"
mtd: partition "kernel" is out of reach -- disabled
0x000000fa0000-0x000000100000 : "spare"
mtd: partition "spare" is out of reach -- disabled
CAN device driver interface
gpiod_set_value: invalid GPIO
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 144 (00:0a:35:00:1e:53)
Generic PHY e000b000.etherne:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=e000b000.etherne:00, irq=-1)
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
EDAC MC: ECC not enabled
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using DMA
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1
zynq_pm_remap_ocm: OCM pool is not available
zynq_pm_suspend_init: Unable to map OCM.
Registering SWP/SWPB emulation handler
hctosys: unable to open rtc device (rtc0)
ALSA device list:
  No soundcards found.
Warning: unable to open an initial console.
Freeing unused kernel memory: 5120K (c0800000 - c0d00000)
hrtimer: interrupt took 40210980 ns
random: dd urandom read with 0 bits of entropy available
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

PetaLinux 2016.4 plnx_arm /dev/ttyPS0

plnx_arm login: 

 I also tried to change /etc/inittab file in rootfs by doing a patch but the patch was ignored. It would be nice to give suggestions how to deal with this problem.

 

Best regards,

0 Kudos