Jump to content

    

Промышленный компьютер тион-про28

Опять же 

Цитата

Я поставлю вопрос по-другому: Зачем вообще вы собираете ядро внутри buildroot? Что мешает собирать все части отдельно?

Я доверяю aaarrr и его этапам сборки ядра. Вот поэтому так и сделал. Не сам я это придумал. Как было сказано делать так и делал. По пути собирал ошибки, не думал что зайду в тупик с падением init. 

Share this post


Link to post
Share on other sites

Реализация внешнее ядро и встроенный компилятор.

Прошу проверить. 

Спойлер

  │ │    [*] Linux Kernel                                                  │ │  
  │ │          Kernel version (Custom version)  --->                       │ │  
  │ │    (4.19) Kernel version                                             │ │  
  │ │    ()    Custom kernel patches                                       │ │  
  │ │          Kernel configuration (Using a custom (def)config file)  --->│ │  
  │ │    (/home/alexey/work/buildroot/kernel.config) Configuration file pat│ │  
  │ │    ()    Additional configuration fragment files                     │ │  
  │ │    ()    Custom boot logo file path                                  │ │  
  │ │          Kernel binary format (zImage)  --->                         │ │  
  │ │          Kernel compression format (gzip compression)  --->          │ │  
  │ │    [*]   Build a Device Tree Blob (DTB)                              │ │  
  │ │    (imx28-evk) In-tree Device Tree Source file names                 │ │  
  │ │    ()      Out-of-tree Device Tree Source file paths                 │ │  
  │ │    [ ]     Build Device Tree with overlay support                    │ │  
  │ │    [ ]   Install kernel image to /boot in target                     │ │  
  │ │    [ ]   Needs host OpenSSL                                          │ │  
  │ │    [ ]   Needs host libelf                                           │ │  
  │ │          Linux Kernel Extensions  --->                               │ │  
  │ │          Linux Kernel Tools  ---> 

 

Спойлер

    Toolchain type (Buildroot toolchain)  --->                    │ │  
  │ │        *** Toolchain Buildroot Options ***                           │ │  
  │ │    (buildroot) custom toolchain vendor name                          │ │  
  │ │        C library (uClibc-ng)  --->                                   │ │  
  │ │        *** Kernel Header Options ***                                 │ │  
  │ │        Kernel Headers (Same as kernel being built)  --->             │ │  
  │ │        Custom kernel headers series (4.17.x)  --->                   │ │  
  │ │        *** uClibc Options ***                                        │ │  
  │ │    (package/uclibc/uClibc-ng.config) uClibc configuration file to use│ │  
  │ │    ()  Additional uClibc configuration fragment files                │ │  
  │ │    [ ] Enable WCHAR support                                          │ │  
  │ │    [ ] Enable toolchain locale/i18n support                          │ │  
  │ │        Thread library implementation (Native POSIX Threading (NPTL)) │ │  
  │ │    [ ] Thread library debugging                                      │ │  
  │ │    [ ] Enable stack protection support                               │ │  
  │ │    [*] Compile and install uClibc utilities                          │ │  
  │ │        *** Binutils Options ***                                      │ │  
  │ │        Binutils Version (binutils 2.31.1)  --->                      │ │  
  │ │    ()  Additional binutils options                                   │ │  
  │ │        *** GCC Options ***                                           │ │  
  │ │        GCC compiler Version (gcc 7.x)  --->                          │ │  
  │ │    ()  Additional gcc options                                        │ │  
  │ │    [ ] Enable C++ support                                            │ │  
  │ │    [ ] Enable Fortran support                                        │ │  
  │ │    [ ] Enable compiler link-time-optimization support  

 

Скопировал kernel.config командой cp ~/work/linux/.config /home/alexey/work/buildroot/kernel.config

также сделал local.mk с LINUX_OVERRIDE_SRCDIR = ../linux

внешнее ядро собрал тулчейн gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi 

выполнив команды:

make ARCH=arm mxs_defconfig

make ARCH=arm CROSS_COMPILE=${ARMCC_GNUEABI7} zImage modules dtbs

У меня упорно выдает ошибку: 

Спойлер

ERROR: No hash found for linux-4.19.tar.xz
package/pkg-generic.mk:143: ошибка выполнения рецепта для цели «/home/alexey/work/buildroot/output/build/linux-headers-4.19/.stamp_downloaded»
make: *** [/home/alexey/work/buildroot/output/build/linux-headers-4.19/.stamp_downloaded] Ошибка 1

 

 

Edited by Alex_Golubev

Share this post


Link to post
Share on other sites

Добавьте в buildroot/package/linux-headers/linux-headers.hash строку

	sha256 0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1 linux-4.19.tar.xz
	

Share this post


Link to post
Share on other sites

еще ошибка:

Спойлер

make[1]: выход из каталога «/home/alexey/work/buildroot/output/build/linux-headers-4.19»
if ! support/scripts/check-kernel-headers.sh  /home/alexey/work/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot  4.17; then exit 1; fi
Incorrect selection of kernel headers: expected 4.17.x, got 4.19.x
package/pkg-generic.mk:278: ошибка выполнения рецепта для цели «/home/alexey/work/buildroot/output/build/linux-headers-4.19/.stamp_staging_installed»
make: *** [/home/alexey/work/buildroot/output/build/linux-headers-4.19/.stamp_staging_installed] Ошибка 1

 

 

Share this post


Link to post
Share on other sites

Заменил 

Custom kernel headers series (4.17.x)  ---> на 
Custom kernel headers series (4.19.x)  --->

Наверное Ура Ура Ура :)

Спойлер

<0>HTLLCLLC

U-Boot 2018.05 (Jun 02 2019 - 18:17:31 +0700)

CPU:   Freescale i.MX28 rev1.2 at 454 MHz
BOOT:  SSP SD/MMC #0, 3V3
SPI:   ready
DRAM:  128 MiB
No arch specific invalidate_icache_all available!
NAND:  256 MiB
MMC:   MXS MMC: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment

Failed (-5)
Video: MXSFB: 'videomode' variable not set!
In:    serial
Out:   serial
Err:   serial
Net:   FEC0 [PRIME], FEC1
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
** Unable to read file boot.scr **
4742480 bytes read in 1402 ms (3.2 MiB/s)
Booting from mmc ...
22030 bytes read in 31 ms (693.4 KiB/s)
Kernel image @ 0x42000000 [ 0x000000 - 0x485d50 ]
## Flattened Device Tree blob at 41000000
   Booting using the fdt blob at 0x41000000
   Loading Device Tree to 47b17000, end 47b1f60d ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.0 (alexey@debian) (gcc version 7.4.0 (Buildroot 2019.05-rc3-00038-g4e9fba9741-dirty)) #2 Sun Jun 2 18:10:53 +07 2019
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Freescale i.MX28 Evaluation Kit
[    0.000000] Memory policy: Data cache writeback
[    0.000000] random: get_random_bytes called from start_kernel+0x84/0x470 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyAMA0,115200 root=/dev/mmcblk0p3 rw rootwait
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 112752K/131072K available (6362K kernel code, 561K rwdata, 2176K rodata, 304K init, 7445K bss, 18320K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (6364 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   ( 304 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 562 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   (7446 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Running RCU self tests
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] clocksource: mxs_timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000036] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.002152] Console: colour dummy device 80x30
[    0.002325] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.002390] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.002450] ... MAX_LOCK_DEPTH:          48
[    0.002506] ... MAX_LOCKDEP_KEYS:        8191
[    0.002560] ... CLASSHASH_SIZE:          4096
[    0.002616] ... MAX_LOCKDEP_ENTRIES:     32768
[    0.002671] ... MAX_LOCKDEP_CHAINS:      65536
[    0.002725] ... CHAINHASH_SIZE:          32768
[    0.002780]  memory used by lock dependency info: 4655 kB
[    0.002835]  per task-struct memory footprint: 1536 bytes
[    0.003153] Calibrating delay loop... 226.09 BogoMIPS (lpj=1130496)
[    0.071434] pid_max: default: 32768 minimum: 301
[    0.072617] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.072729] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.080877] CPU: Testing write buffer coherency: ok
[    0.090207] Setting up static identity map for 0x40008400 - 0x40008458
[    0.101238] devtmpfs: initialized
[    0.165448] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.165708] futex hash table entries: 256 (order: 1, 11264 bytes)
[    0.167251] pinctrl core: initialized pinctrl subsystem
[    0.181337] NET: Registered protocol family 16
[    0.184501] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.397528] Serial: AMBA PL011 UART driver
[    0.401171] 80074000.serial: ttyAMA0 at MMIO 0x80074000 (irq = 236, base_baud = 0) is a PL011 rev2
[    0.723522] console [ttyAMA0] enabled
[    0.814489] mxs-dma 80004000.dma-apbh: initialized
[    0.832881] mxs-dma 80024000.dma-apbx: initialized
[    0.862765] SCSI subsystem initialized
[    0.869522] usbcore: registered new interface driver usbfs
[    0.876119] usbcore: registered new interface driver hub
[    0.882209] usbcore: registered new device driver usb
[    0.898044] pps_core: LinuxPPS API ver. 1 registered
[    0.903109] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.912698] PTP clock support registered
[    0.919577] Advanced Linux Sound Architecture Driver Initialized.
[    0.935188] clocksource: Switched to clocksource mxs_timer
[    1.543501] NET: Registered protocol family 2
[    1.553240] tcp_listen_portaddr_hash hash table entries: 128 (order: 0, 5120 bytes)
[    1.561363] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    1.568724] TCP bind hash table entries: 1024 (order: 3, 36864 bytes)
[    1.575873] TCP: Hash tables configured (established 1024 bind 1024)
[    1.583458] UDP hash table entries: 256 (order: 2, 20480 bytes)
[    1.590017] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes)
[    1.597927] NET: Registered protocol family 1
[    1.609126] RPC: Registered named UNIX socket transport module.
[    1.615641] RPC: Registered udp transport module.
[    1.620442] RPC: Registered tcp transport module.
[    1.625430] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.647214] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    1.738179] NFS: Registering the id_resolver key type
[    1.744498] Key type id_resolver registered
[    1.749267] Key type id_legacy registered
[    1.753882] jffs2: version 2.2. (NAND) В© 2001-2006 Red Hat, Inc.
[    1.786618] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    1.794421] io scheduler noop registered (default)
[    1.799575] io scheduler mq-deadline registered
[    1.804206] io scheduler kyber registered
[    1.818630] pwm-backlight backlight: backlight supply power not found, using dummy regulator
[    1.829241] pwm-backlight backlight: Linked as a consumer to regulator.0
[    1.846012] 8006a000.serial: ttyAPP0 at MMIO 0x8006a000 (irq = 234, base_baud = 1500000) is a 8006a000.serial
[    1.858263] mxs-auart 8006a000.serial: Found APPUART 3.1.0
[    1.866373] 80070000.serial: ttyAPP3 at MMIO 0x80070000 (irq = 235, base_baud = 1500000) is a 80070000.serial
[    1.878720] mxs-auart 80070000.serial: Found APPUART 3.1.0
[    1.887644] seiko_panel panel: Linked as a consumer to regulator.6
[    1.894708] seiko_panel panel: Linked as a consumer to regulator.8
[    1.906421] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.913141] [drm] No driver support for vblank timestamp query.
[    2.086599] Console: switching to colour frame buffer device 100x30
[    2.110418] mxsfb 80030000.lcdif: fb0: DRM emulated frame buffer device
[    2.127841] [drm] Initialized mxsfb-drm 1.0.0 20160824 for 80030000.lcdif on minor 0
[    2.187448] random: fast init done
[    2.229783] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
[    2.236447] nand: Micron MT29F2G08ABAEAWP
[    2.240559] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    2.255907] Scanning device for bad blocks
[    3.538595] gpmi-nand 8000c000.gpmi-nand: driver registered.
[    3.576357] m25p80 spi1.0: unrecognized JEDEC id bytes: ff, ff, ff
[    3.588367] libphy: Fixed MDIO Bus: probed
[    3.604336] fec 800f0000.ethernet: Linked as a consumer to regulator.3
[    3.756952] libphy: fec_enet_mii_bus: probed
[    3.767793] fec 800f4000.ethernet: 800f4000.ethernet supply phy not found, using dummy regulator
[    3.777728] fec 800f4000.ethernet: Linked as a consumer to regulator.0
[    3.791886] usbcore: registered new interface driver asix
[    3.798044] usbcore: registered new interface driver ax88179_178a
[    3.804589] usbcore: registered new interface driver cdc_ether
[    3.811281] usbcore: registered new interface driver smsc95xx
[    3.817782] usbcore: registered new interface driver net1080
[    3.823905] usbcore: registered new interface driver cdc_subset
[    3.830869] usbcore: registered new interface driver zaurus
[    3.837355] usbcore: registered new interface driver cdc_ncm
[    3.843120] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.850473] usbcore: registered new interface driver usb-storage
[    3.864256] imx_usb 80080000.usb: Linked as a consumer to regulator.4
[    3.890917] imx_usb 80090000.usb: Linked as a consumer to regulator.5
[    3.903087] ci_hdrc ci_hdrc.1: EHCI Host Controller
[    3.909443] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
[    3.945504] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
[    3.966713] hub 1-0:1.0: USB hub found
[    3.971369] hub 1-0:1.0: 1 port detected
[    3.991985] input: mxs-lradc-ts as /devices/soc0/80000000.apb/80040000.apbx/80050000.lradc/mxs-lradc-ts/input/input0
[    4.013351] stmp3xxx-rtc 80056000.rtc: rtc core: registered 80056000.rtc as rtc0
[    4.022941] i2c /dev entries driver
[    4.038323] stmp3xxx_rtc_wdt stmp3xxx_rtc_wdt: initialized watchdog with heartbeat 19s
[    4.052033] mxs-mmc 80010000.ssp: Linked as a consumer to regulator.2
[    4.090955] mxs-mmc 80010000.ssp: initialized
[    4.118909] mxs-dcp 80028000.dcp: Failed to register sha1 hash!
[    4.127978] mxs-dcp: probe of 80028000.dcp failed with error -22
[    4.142267] usbcore: registered new interface driver usbhid
[    4.148248] usbhid: USB HID core driver
[    4.177267] mmc0: host does not support reading read-only switch, assuming write-enable
[    4.196021] sgtl5000 0-000a: Linked as a consumer to regulator.1
[    4.202948] mmc0: new high speed SDHC card at address aaaa
[    4.224639] mmcblk0: mmc0:aaaa SL16G 14.8 GiB 
[    4.240936] mxs-sgtl5000 sound: ASoC: CODEC DAI sgtl5000 not registered
[    4.264070] NET: Registered protocol family 17
[    4.275673]  mmcblk0: p1 p2 p3
[    4.282866] Key type dns_resolver registered
[    4.309782] registered taskstats version 1
[    4.398234] sgtl5000 0-000a: Error reading chip id -6
[    4.409421] mxs-sgtl5000 sound: ASoC: CODEC DAI sgtl5000 not registered
[    4.419694] mxs-sgtl5000 sound: ASoC: CODEC DAI sgtl5000 not registered
[    4.429202] stmp3xxx-rtc 80056000.rtc: setting system clock to 1970-01-01 00:00:10 UTC (10)
[    4.439489] usb0_vbus: disabling
[    4.443301] can-3v3: disabling
[    4.446783] ALSA device list:
[    4.449846]   No soundcards found.
[    4.460110] uart-pl011 80074000.serial: no DMA platform data
[    4.482983] EXT4-fs (mmcblk0p3): mounting ext2 file system using the ext4 subsystem
[    4.543229] EXT4-fs (mmcblk0p3): mounted filesystem without journal. Opts: (null)
[    4.551653] VFS: Mounted root (ext2 filesystem) on device 179:3.
[    4.577781] devtmpfs: mounted
[    4.583440] Freeing unused kernel memory: 304K
[    4.588239] This architecture does not have kernel memory protection.
[    4.594774] Run /sbin/init as init process
[    4.873915] EXT4-fs (mmcblk0p3): re-mounted. Opts: block_validity,barrier,user_xattr
Starting syslogd: OK
Starting klogd: OK
Initializing random number generator... [    5.512215] random: dd: uninitialized urandom read (512 bytes read)
done.
Starting network: OK


Welcome to Buildroot

buildroot login: useruseruser[  103.106557] random: crng init done

 

Share this post


Link to post
Share on other sites

Ну из видимых косяков - phy не поймался, соотв. Ethernet'а нету, а так вроде норма...

Share this post


Link to post
Share on other sites
Цитата

phy не поймался

А почему ? 

У меня еще lcd не заработал. 

Edited by Alex_Golubev

Share this post


Link to post
Share on other sites
16 minutes ago, Alex_Golubev said:

А почему ? 

Ну либо в DT не активирован, либо в номер не попали. Вариантов масса.

17 minutes ago, Alex_Golubev said:

У меня еще lcd не заработал. 

А вот теперь попробуйте включить pinctrl debug и начинайте изучать dmesg.

Share this post


Link to post
Share on other sites
Цитата

включить pinctrl debug

Как его включить инструкцию можно?

Share this post


Link to post
Share on other sites

Kernel hacking - Kernel debugging

После этого появится пункт Debug PINCTRL calls в Device Drivers - Pin Controllers

Пересобираем ядро ,грузимся, внимательно смотрим dmesg

Share this post


Link to post
Share on other sites

при подключение к qt creator через ssh получил ошибку во время отладки. 

Debugging starts
sh
: exec: line 1: gdbserver: not found

И не работает тачь.

Edited by Alex_Golubev

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now