Open Pve88 opened 5 years ago
I met the same issue and used the in-tree dts. It workes, i.e. I flashed U-Boot, put everything on a micro SD card got the kernel booting and can login. There are not much peripherals supported at the moment. But, anyway: thanks @fdu for your efforts.
U-Boot > mmc dev 0; load mmc 0:1 ${dtb_addr} stm32f746-disco.dtb; load mmc 0:1 ${kernel_addr} zImage; bootz ${kernel_addr} - ${dtb_addr}"
switch to partitions #0, OK
mmc0 is current device
12653 bytes read in 15 ms (823.2 KiB/s)
1316280 bytes read in 126 ms (10 MiB/s)
## Flattened Device Tree blob at c0700000
Booting using the fdt blob at 0xc0700000
Loading Device Tree to c0698000, end c069e16c ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.15.7 (embedded@embedded-VirtualBox) (gcc version 6.3.0 (Buildroot 2017.02.9-dirty)) #4 PREEMPT Fri Oct 5 218
[ 0.000000] CPU: ARMv7-M [410fc271] revision 1 (ARMv7M), cr=00000000
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[ 0.000000] OF: fdt: Machine model: STMicroelectronics STM32F746-DISCO board
[ 0.000000] debug: ignoring loglevel setting.
[ 0.000000] On node 0 totalpages: 2048
[ 0.000000] Normal zone: 16 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 2048 pages, LIFO batch:0
[ 0.000000] random: fast init done
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists, mobility grouping off. Total pages: 2032
[ 0.000000] Kernel command line: console=ttyS0,115200 earlyprintk consoleblank=0 ignore_loglevel panic=3
[ 0.000000] Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Memory: 5872K/8192K available (1166K kernel code, 105K rwdata, 424K rodata, 264K init, 115K bss, 2320K reserved, 0K cma-res)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0x00000000 - 0x00001000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0x00000000 - 0xffffffff (4095 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc0800000 ( 8 MB)
[ 0.000000] .text : 0x(ptrval) - 0x(ptrval) (1167 kB)
[ 0.000000] .init : 0x(ptrval) - 0x(ptrval) ( 264 kB)
[ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 106 kB)
[ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 116 kB)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] interrupt-controller@40013c00: bank0, External IRQs available:0xffffff
[ 0.000000] clocksource: arm_system_timer: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 298634427 ns
[ 0.000000] ARM System timer initialized as clocksource
[ 0.000000] /soc/timer@40000c00: STM32 clockevent driver initialized (32 bits)
[ 0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns
[ 0.050000] Calibrating delay loop... 393.21 BogoMIPS (lpj=1966080)
[ 0.050000] pid_max: default: 4096 minimum: 301
[ 0.050000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.050000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.050000] Hierarchical SRCU implementation.
[ 0.060000] devtmpfs: initialized
[ 0.100000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.100000] pinctrl core: initialized pinctrl subsystem
[ 0.130000] stm32f746-pinctrl soc:pin-controller: GPIOA bank added
[ 0.130000] stm32f746-pinctrl soc:pin-controller: GPIOB bank added
[ 0.130000] stm32f746-pinctrl soc:pin-controller: GPIOC bank added
[ 0.130000] stm32f746-pinctrl soc:pin-controller: GPIOD bank added
[ 0.140000] stm32f746-pinctrl soc:pin-controller: GPIOE bank added
[ 0.140000] stm32f746-pinctrl soc:pin-controller: GPIOF bank added
[ 0.140000] stm32f746-pinctrl soc:pin-controller: GPIOG bank added
[ 0.140000] stm32f746-pinctrl soc:pin-controller: GPIOH bank added
[ 0.150000] stm32f746-pinctrl soc:pin-controller: GPIOI bank added
[ 0.150000] stm32f746-pinctrl soc:pin-controller: GPIOJ bank added
[ 0.150000] stm32f746-pinctrl soc:pin-controller: GPIOK bank added
[ 0.150000] stm32f746-pinctrl soc:pin-controller: Pinctrl STM32 initialized
[ 0.190000] clocksource: Switched to clocksource arm_system_timer
[ 0.320000] workingset: timestamp_bits=30 max_order=11 bucket_order=0
[ 0.370000] io scheduler noop registered (default)
[ 0.370000] io scheduler mq-deadline registered
[ 0.370000] io scheduler kyber registered
[ 0.370000] STM32 USART driver initialized
[ 0.370000] 40011000.serial: ttyS0 at MMIO 0x40011000 (irq = 31, base_baud = 6250000) is a stm32-usart
[ 0.770000] console [ttyS0] enabled
[ 0.770000] stm32-usart 40011000.serial: rx dma alloc failed
[ 0.770000] stm32-usart 40011000.serial: interrupt mode used for rx (no dma)
[ 0.780000] stm32-usart 40011000.serial: tx dma alloc failed
[ 0.790000] stm32-usart 40011000.serial: interrupt mode used for tx (no dma)
[ 0.800000] i2c /dev entries driver
[ 0.820000] hctosys: unable to open rtc device (rtc0)
[ 0.820000] Freeing unused kernel memory: 264K
[ 0.830000] This architecture does not have kernel memory protection.
Initializing random number generator... urandom start: failed.
done.
Starting network: ifconfig: socket: Function not implemented
FAIL
Welcome to Buildroot
STM32F746-disco login: root
Jan 1 00:00:04 login[59]: root login on 'console'
BusyBox v1.26.2 (2018-10-05 20:10:21 CEST) hush - the humble shell
Enter 'help' for a list of built-in commands.
bump
bump! Same issue here
same!
Got it to compile.
See forks there are some patches regarding building. Use these.
Then Search stm32f746-disco.dts in the directory and copy the one from the kennel directory and copy it to. /configs/my-stm32f746-disco.dts
Don't miss the "my-" has been added at the beginning of the filename.
You also have to install atftp with apt-get install.
The build with: sudo make build
Good luck
This works
Got it to compile.
See forks there are some patches regarding building. Use these.
Then Search stm32f746-disco.dts in the directory and copy the one from the kennel directory and copy it to. /configs/my-stm32f746-disco.dts
Don't miss the "my-" has been added at the beginning of the filename.
You also have to install atftp with apt-get install.
The build with: sudo make build
Good luck
This works
Hi @popy2k14 , thanks for the kind feedback and for the information provided.
As far as I could see @beattie 's fork was 2 commit ahead of fdu:master, I downloaded his fork and applied the patch of @nanobrain (removed -J from Makefile ) , installed atftp as you've recommended, @beattie 's fork was already including the /configs/my-stm32f746-disco.dts file so I didn't do anything else, make clean, make bootstrap, make build.. , these files were created
/home/user/STM32F746G-disco_Buildroot-master/buildroot/output/images/my-stm32f746-disco.dtb /home/user/STM32F746G-disco_Buildroot-master/buildroot/output/images/rootfs.cpio /home/user/STM32F746G-disco_Buildroot-master/buildroot/output/images/u-boot.bin /home/user/STM32F746G-disco_Buildroot-master/buildroot/output/images/u-boot-spl.bin /home/user/STM32F746G-disco_Buildroot-master/buildroot/output/images/zImage
But the build process ended with these :
Kernel: arch/arm/boot/zImage is ready Copy the kernel image(s) to its(their) final destination /usr/bin/install -m 0644 -D /home/user/STM32F746G-disco_Buildroot-master/buildroot/output/build/linux-custom/arch/arm/boot/zImage /home/user/STM32F746G-disco_Buildroot-master/buildroot/output/images/zImage If there is a .ub file copy it to the final destination test ! -f /home/user/STM32F746G-disco_Buildroot-master/buildroot/output/build/linux-custom/arch/arm/boot/zImage.ub || cp /home/user/STM32F746G-disco_Buildroot-master/buildroot/output/build/linux-custom/arch/arm/boot/zImage.ub /home/user/STM32F746G-disco_Buildroot-master/buildroot/output/images make[1]: Leaving directory '/home/user/STM32F746G-disco_Buildroot-master/buildroot' cp buildroot/output/images/my-stm32f746-disco.dtb /srv/tftp/stm32f746/stm32f746-disco.dtb cp: cannot create regular file '/srv/tftp/stm32f746/stm32f746-disco.dtb': No such file or directory Makefile:22: recipe for target 'build' failed make: *** [build] Error 1
Removing the -J patch didn't make any change. I think the problem is related to tftp installation, /srv directory exists but empty, no tftp folder inside. I'm working on..
Nice that you made progress. You have to create the directory with:
sudo mkdir /srv/tftp/stm32f746/
Rerun:
sudo make build
This should make it.
Nice that you made progress. You have to create the directory with:
sudo mkdir /srv/tftp/stm32f746/
Rerun:sudo make build
This should make it.
It worked, thanks a lot..
After building and flashing just establish a serial connection with 115200 baud, reset the board, u-boot have to answer like this:
U-Boot SPL 2018.03-rc3 (Feb 08 2020 - 16:29:56 +0300) Trying to boot from XIP
U-Boot 2018.03-rc3 (Feb 08 2020 - 16:29:56 +0300)
Model: STMicroelectronics STM32F746-DISCO board DRAM: 8 MiB Flash: 1 MiB MMC: MMC: 0 In: serial@40011000 Out: serial@40011000 Err: serial@40011000 usr button is at LOW LEVEL Net: Warning: ethernet@40028000 (eth0) using random MAC address - 3e:cf:60:44:9d:c2 eth0: ethernet@40028000 Hit SPACE in 0 seconds to stop autoboot. SF: Detected n25q128 with page size 256 Bytes, erase size 64 KiB, total 16 MiB, mapped at 90000000 device 0 offset 0x0, size 0x4000 SF: 16384 bytes @ 0x0 Read: OK device 0 offset 0x10000, size 0x200000 SF: 2097152 bytes @ 0x10000 Read: OK U-Boot >
when I try to make build, I see error:
So file my-stm32f746-disco.dts doesnt exist Where can I find it, and can I use in-tree stm32f746-disco.dts ?