开贴记录配置最新buildroot-2018.08.使用buildroot自带工具链一键编译生成uboot,kernel,dtb和rootfs.
最新稳定版buildroot下载:buildroot-2018.08.02稳定版
我配置好的config文件:配置好的.config
最近编辑记录 checkout (2018-11-09 12:27:16)
离线
本人的开发环境是vmware workstation 15 pro+ubuntu 16.04_x64
参照沉鱼的帖子荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)
做如下配置:
1.target options配置
2.kernel配置
使用licheepi官方git代码库linux-4.13.y分支
使用licheepi_zero_deconfig配置(可在内核文件夹arch/arm/configs/下找到)
使用sun8i-v3s-licheepi-zero.dts,生成dtb(可在内核文件夹arch/arm/boot/dts/下找到)
3.uboot配置
使用Kconfig构建(新版本都是使用Kconfig)
使用licheepi官方git代码库ubootuboot v3s-spi-experimental分支
使用licheepi官方uboot里面的LicheePi_Zero_defconfig
4.Toolchain配置
使用buildroot工具链
kernel header配置成same as kernel being built
custom kernel headers series配置成相应的4.13.x版本(可在内核文件夹根目录Makefile文件中查看相应内核版本)
其他项默认即可,如默认编译uClibc, 开启MMU等
5.其余项配置,可按需配置
Build options,默认配置
System configuration
-/dev managerment,选择dynamic using devtmpfs+mdev
Target packages,各种第三方软件包,默认配置
Filesystem images,默认是tar
Host utilities,默认配置
Legacy config options,默认配置
保存配置,执行make,由于buildroot版本较新,可能对系统软件个别依赖包版本较高,可在编译前sudo apt-get update,再sudo apt-get upgrade
离线
配置完,一键编译后的uboot还是不能直接从sd卡启动的,需要手动配置CONFIG_BOOTCOMMAND和CONFIG_BOOTARGS参数
1.cd 你的buildroot所在根目录/output/build/uboot-v3s-spi-experimental/
2.删除.stamp_built,.stamp_images_installed,.stamp_installed
3.修改 include/configs/sun8i.h, 使u-boot可以直接从tf卡启动:
#define CONFIG_BOOTCOMMAND "setenv bootm_boot_mode sec; " \
"load mmc 0:1 0x41000000 zImage; " \
"load mmc 0:1 0x41800000 sun8i-v3s-licheepi-zero-dock.dtb; " \
"bootz 0x41000000 - 0x41800000;"
#define CONFIG_BOOTARGS "console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw vt.global_cursor_default=0"
4.在回到builroot根目录,再次make
5.在output/images目录可以得到uboot.bin,xxx.dtb,zimage和rootfs.tar
6. 烧录TF卡启动盘:
参考搬运:荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)
1) 删除TF卡所有分区
2) 将uboot写入到sd卡8k偏移处(必须8K偏移, brom龟腚的)。
sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8
3) 建立第一个分区,大小32M(可以随意填写), 格式FAT16, 把zImage, sun8i-v3s-licheepi-zero.dtb拷贝到 这个分区
4) 建立第二个分区,用尽剩余空间,格式ext4, 把buildroot产生的rootfs.tar解压到该分区根目录
tar xvf output/images/rootfs.tar -C /挂载的tf卡第二个分区目录
附 log如下:
U-Boot SPL 2017.01-rc2 (Nov 08 2018 - 20:06:11)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot 2017.01-rc2 (Nov 08 2018 - 20:06:11 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: unrecognized JEDEC id bytes: 00, 00, 00
*** Warning - spi_flash_probe() failed, using default environment
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
U-Boot 2017.01-rc2 (Nov 08 2018 - 20:06:11 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: unrecognized JEDEC id bytes: 00, 00, 00
*** Warning - spi_flash_probe() failed, using default environment
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
Net: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 0
reading zImage
3937936 bytes read in 206 ms (18.2 MiB/s)
reading sun8i-v3s-licheepi-zero.dtb
11187 bytes read in 26 ms (419.9 KiB/s)
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 42dfa000, end 42dffbb2 ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.13.16-licheepi-zero (root@ubuntu) (gcc version 7.3.0 (Buildroot 2018.08.2)) #3 SMP Fri Nov 9 00:17:39 CST 2018
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Lichee Pi Zero
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] percpu: Embedded 16 pages/cpu @c3f5f000 s33868 r8192 d23476 u65536
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw vt.global_cursor_default=0
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Memory: 55096K/65536K available (6144K kernel code, 217K rwdata, 1436K rodata, 1024K init, 261K bss, 10440K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xc4800000 - 0xff800000 ( 944 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0700000 (7136 kB)
[ 0.000000] .init : 0xc0900000 - 0xc0a00000 (1024 kB)
[ 0.000000] .data : 0xc0a00000 - 0xc0a366c0 ( 218 kB)
[ 0.000000] .bss : 0xc0a3d7f0 - 0xc0a7efec ( 262 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU event tracing is enabled.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000019] Switching to timer-based delay loop, resolution 41ns
[ 0.000174] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000404] Console: colour dummy device 80x30
[ 0.000438] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000453] pid_max: default: 32768 minimum: 301
[ 0.000580] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000597] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001194] CPU: Testing write buffer coherency: ok
[ 0.001567] /cpus/cpu@0 missing clock-frequency property
[ 0.001591] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002044] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.002229] Hierarchical SRCU implementation.
[ 0.002729] smp: Bringing up secondary CPUs ...
[ 0.002743] smp: Brought up 1 node, 1 CPU
[ 0.002751] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.002758] CPU: All CPU(s) started in SVC mode.
[ 0.003509] devtmpfs: initialized
[ 0.006461] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.006735] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.006765] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.006925] pinctrl core: initialized pinctrl subsystem
[ 0.007808] random: get_random_u32 called from bucket_table_alloc+0x110/0x238 with crng_init=0
[ 0.007943] NET: Registered protocol family 16
[ 0.008390] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.009493] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.009511] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.022063] SCSI subsystem initialized
[ 0.022350] usbcore: registered new interface driver usbfs
[ 0.022417] usbcore: registered new interface driver hub
[ 0.022503] usbcore: registered new device driver usb
[ 0.022766] pps_core: LinuxPPS API ver. 1 registered
[ 0.022777] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.022808] PTP clock support registered
[ 0.023035] Advanced Linux Sound Architecture Driver Initialized.
[ 0.024843] clocksource: Switched to clocksource arch_sys_counter
[ 0.035851] NET: Registered protocol family 2
[ 0.036445] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.036478] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.036501] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.036624] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.036672] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.036863] NET: Registered protocol family 1
[ 0.037458] RPC: Registered named UNIX socket transport module.
[ 0.037476] RPC: Registered udp transport module.
[ 0.037481] RPC: Registered tcp transport module.
[ 0.037487] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.039536] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.048572] NFS: Registering the id_resolver key type
[ 0.048619] Key type id_resolver registered
[ 0.048626] Key type id_legacy registered
[ 0.049668] random: fast init done
[ 0.052668] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.052690] io scheduler noop registered
[ 0.052697] io scheduler deadline registered
[ 0.052942] io scheduler cfq registered (default)
[ 0.052956] io scheduler mq-deadline registered
[ 0.052962] io scheduler kyber registered
[ 0.057383] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.130187] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.133726] console [ttyS0] disabled
[ 0.153995] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 33, base_baud = 1500000) is a U6_16550A
[ 0.730815] console [ttyS0] enabled
[ 0.737534] libphy: Fixed MDIO Bus: probed
[ 0.741981] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.748597] ehci-platform: EHCI generic platform driver
[ 0.754087] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 0.759759] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 0.767682] ehci-platform 1c1a000.usb: irq 25, io mem 0x01c1a000
[ 0.794889] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 0.802044] hub 1-0:1.0: USB hub found
[ 0.806020] hub 1-0:1.0: 1 port detected
[ 0.810484] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.816779] ohci-platform: OHCI generic platform driver
[ 0.822323] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 0.829049] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[ 0.837003] ohci-platform 1c1a400.usb: irq 26, io mem 0x01c1a400
[ 0.909912] hub 2-0:1.0: USB hub found
[ 0.913739] hub 2-0:1.0: 1 port detected
[ 0.921298] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[ 0.931051] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[ 0.937938] sun6i-rtc 1c20400.rtc: RTC enabled
[ 0.942468] i2c /dev entries driver
[ 0.947364] input: ns2009_ts as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0048/input/input0
[ 0.956908] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.025085] sunxi-mmc 1c0f000.mmc: base:0xc4869000 irq:23
[ 1.032135] usbcore: registered new interface driver usbhid
[ 1.037809] usbhid: USB HID core driver
[ 1.043484] NET: Registered protocol family 17
[ 1.048163] Key type dns_resolver registered
[ 1.052570] Registering SWP/SWPB emulation handler
[ 1.064226] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.075671] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.081437] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[ 1.092806] hub 3-0:1.0: USB hub found
[ 1.096782] hub 3-0:1.0: 1 port detected
[ 1.101852] using random self ethernet address
[ 1.106411] using random host ethernet address
[ 1.111878] usb0: HOST MAC 82:36:5c:de:e9:65
[ 1.116306] usb0: MAC 7e:61:88:48:1c:f4
[ 1.120188] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[ 1.127706] g_cdc gadget: g_cdc ready
[ 1.131701] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 00:00:32 UTC (32)
[ 1.139972] vcc3v0: disabling
[ 1.142948] vcc5v0: disabling
[ 1.145969] ALSA device list:
[ 1.148935] No soundcards found.
[ 1.154304] Waiting for root device /dev/mmcblk0p2...
[ 1.191988] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.201993] mmc0: new high speed SDHC card at address 0001
[ 1.208315] mmcblk0: mmc0:0001 SD8GB 7.28 GiB
[ 1.214376] mmcblk0: p1 p2
[ 1.246409] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.255643] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[ 1.283859] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in b_idle (80, <SessEnd), retry #0, port1 00000100
[ 1.356292] EXT4-fs (mmcblk0p2): recovery complete
[ 1.363139] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.371387] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 1.380654] devtmpfs: mounted
[ 1.384805] Freeing unused kernel memory: 1024K
[ 1.472655] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Starting logging: OK
Starting mdev...
Initializing random number generator... done.
Starting network: OK
Welcome to Buildroot
buildroot login: root
#
第一次发帖,先写这么多了:D
离线
1.47秒开机是真的吗?
离线
有没有朋友试过 【SD 接口的 NAND】+V3s, 启动速度如何?
https://whycan.cn/t_1694.html
这芯片淘宝还没卖的。
离线
离线
太感动了,再次感谢楼主,我正在编译,电脑配置低有点卡.
用家里的服务器, 执行 make 之后大概一小时全部完成,该生成的文件都有了,
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
# BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY is not set
# BR2_TARGET_UBOOT_LATEST_VERSION is not set
# BR2_TARGET_UBOOT_CUSTOM_VERSION is not set
# BR2_TARGET_UBOOT_CUSTOM_TARBALL is not set
BR2_TARGET_UBOOT_CUSTOM_GIT=y
# BR2_TARGET_UBOOT_CUSTOM_HG is not set
# BR2_TARGET_UBOOT_CUSTOM_SVN is not set
BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/Lichee-Pi/u-boot.git"
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="v3s-spi-experimental"
BR2_TARGET_UBOOT_VERSION="v3s-spi-experimental"
BR2_TARGET_UBOOT_PATCH=""
BR2_TARGET_UBOOT_USE_DEFCONFIG=y
# BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG is not set
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="LicheePi_Zero"
BR2_LINUX_KERNEL_CUSTOM_GIT=y
# BR2_LINUX_KERNEL_CUSTOM_HG is not set
# BR2_LINUX_KERNEL_CUSTOM_SVN is not set
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/Lichee-Pi/linux.git"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="zero-4.13.y"
BR2_LINUX_KERNEL_VERSION="zero-4.13.y"
BR2_LINUX_KERNEL_PATCH=""
BR2_LINUX_KERNEL_USE_DEFCONFIG=y
# BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG is not set
# BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG is not set
BR2_LINUX_KERNEL_DEFCONFIG="licheepi_zero"
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES=""
# BR2_LINUX_KERNEL_UIMAGE is not set
# BR2_LINUX_KERNEL_APPENDED_UIMAGE is not set
BR2_LINUX_KERNEL_ZIMAGE=y
# BR2_LINUX_KERNEL_APPENDED_ZIMAGE is not set
# BR2_LINUX_KERNEL_VMLINUX is not set
# BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM is not set
BR2_LINUX_KERNEL_GZIP=y
# BR2_LINUX_KERNEL_LZ4 is not set
# BR2_LINUX_KERNEL_LZMA is not set
# BR2_LINUX_KERNEL_LZO is not set
# BR2_LINUX_KERNEL_XZ is not set
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-v3s-licheepi-zero"
BR2_LINUX_KERNEL_CUSTOM_DTS_PATH=""
第一次知道还能这么玩,
直接git下载指定地址的源码和分支.
真是三人行必有我师!
离线
不错,感谢分享。。。
离线
/opt/buildroot-2018.08.2/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-g++ -c -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os --sysroot=/opt/buildroot-2018.08.2/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot -O3 -O3 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -D_REENTRANT -fPIC -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/double-conversion/include -I../3rdparty/double-conversion/include/double-conversion -I../3rdparty/forkfd -I../../include -I../../include/QtCore -I../../include/QtCore/5.11.1 -I../../include/QtCore/5.11.1/QtCore -I.moc -I.tracegen -I/opt/buildroot-2018.08.2/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/include -I../../mkspecs/devices/linux-buildroot-g++ -o .obj/qlibraryinfo.o global/qlibraryinfo.cpp
/opt/buildroot-2018.08.2/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-g++ -c -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os --sysroot=/opt/buildroot-2018.08.2/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot -O3 -O3 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -D_REENTRANT -fPIC -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I. -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty/double-conversion/include -I../3rdparty/double-conversion/include/double-conversion -I../3rdparty/forkfd -I../../include -I../../include/QtCore -I../../include/QtCore/5.11.1 -I../../include/QtCore/5.11.1/QtCore -I.moc -I.tracegen -I/opt/buildroot-2018.08.2/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/include -I../../mkspecs/devices/linux-buildroot-g++ -o .obj/qnumeric.o global/qnumeric.cpp
In file included from ../../include/QtCore/qstring.h:1:0,
from global/qglobal.cpp:42:
../../include/QtCore/../../src/corelib/tools/qstring.h:792:53: error: ‘wstring’ in namespace ‘std’ does not name a type
static inline QString fromStdWString(const std::wstring &s);
^~~~~~~
../../include/QtCore/../../src/corelib/tools/qstring.h:793:17: error: ‘wstring’ in namespace ‘std’ does not name a type
inline std::wstring toStdWString() const;
^~~~~~~
../../include/QtCore/../../src/corelib/tools/qstring.h:1372:13: error: ‘wstring’ in namespace ‘std’ does not name a type
inline std::wstring QString::toStdWString() const
^~~~~~~
../../include/QtCore/../../src/corelib/tools/qstring.h:1387:51: error: ‘wstring’ in namespace ‘std’ does not name a type
inline QString QString::fromStdWString(const std::wstring &s)
^~~~~~~
../../include/QtCore/../../src/corelib/tools/qstring.h: In static member function ‘static QString QString::fromStdWString(const int&)’:
../../include/QtCore/../../src/corelib/tools/qstring.h:1388:27: error: request for member ‘data’ in ‘s’, which is of non-class type ‘const int’
{ return fromWCharArray(s.data(), int(s.size())); }
^~~~
../../include/QtCore/../../src/corelib/tools/qstring.h:1388:41: error: request for member ‘size’ in ‘s’, which is of non-class type ‘const int’
{ return fromWCharArray(s.data(), int(s.size())); }
^~~~
In file included from ../../include/QtCore/qstring.h:1:0,
from ../../include/QtCore/../../src/corelib/io/qdir.h:43,
from ../../include/QtCore/qdir.h:1,
from global/qlibraryinfo.cpp:41:
../../include/QtCore/../../src/corelib/tools/qstring.h:792:53: error: ‘wstring’ in namespace ‘std’ does not name a type
static inline QString fromStdWString(const std::wstring &s);
^~~~~~~
../../include/QtCore/../../src/corelib/tools/qstring.h:793:17: error: ‘wstring’ in namespace ‘std’ does not name a type
inline std::wstring toStdWString() const;
^~~~~~~
In file included from ../../include/QtCore/qstring.h:1:0,
from ../../include/QtCore/../../src/corelib/tools/qversionnumber.h:46,
from ../../include/QtCore/qversionnumber.h:1,
from ../../include/QtCore/5.11.1/QtCore/private/../../../../../src/corelib/global/qglobal_p.h:67,
from ../../include/QtCore/5.11.1/QtCore/private/qglobal_p.h:1,
from global/qnumeric_p.h:55,
from global/qnumeric.cpp:41:
../../include/QtCore/../../src/corelib/tools/qstring.h:792:53: error: ‘wstring’ in namespace ‘std’ does not name a type
static inline QString fromStdWString(const std::wstring &s);
^~~~~~~
../../include/QtCore/../../src/corelib/tools/qstring.h:793:17: error: ‘wstring’ in namespace ‘std’ does not name a type
inline std::wstring toStdWString() const;
^~~~~~~
../../include/QtCore/../../src/corelib/tools/qstring.h:1372:13: error: ‘wstring’ in namespace ‘std’ does not name a type
inline std::wstring QString::toStdWString() const
^~~~~~~
../../include/QtCore/../../src/corelib/tools/qstring.h:1387:51: error: ‘wstring’ in namespace ‘std’ does not name a type
inline QString QString::fromStdWString(const std::wstring &s)
^~~~~~~
../../include/QtCore/../../src/corelib/tools/qstring.h: In static member function ‘static QString QString::fromStdWString(const int&)’:
../../include/QtCore/../../src/corelib/tools/qstring.h:1388:27: error: request for member ‘data’ in ‘s’, which is of non-class type ‘const int’
{ return fromWCharArray(s.data(), int(s.size())); }
^~~~
../../include/QtCore/../../src/corelib/tools/qstring.h:1388:41: error: request for member ‘size’ in ‘s’, which is of non-class type ‘const int’
{ return fromWCharArray(s.data(), int(s.size())); }
^~~~
../../include/QtCore/../../src/corelib/tools/qstring.h:1372:13: error: ‘wstring’ in namespace ‘std’ does not name a type
inline std::wstring QString::toStdWString() const
^~~~~~~
../../include/QtCore/../../src/corelib/tools/qstring.h:1387:51: error: ‘wstring’ in namespace ‘std’ does not name a type
inline QString QString::fromStdWString(const std::wstring &s)
^~~~~~~
../../include/QtCore/../../src/corelib/tools/qstring.h: In static member function ‘static QString QString::fromStdWString(const int&)’:
../../include/QtCore/../../src/corelib/tools/qstring.h:1388:27: error: request for member ‘data’ in ‘s’, which is of non-class type ‘const int’
{ return fromWCharArray(s.data(), int(s.size())); }
^~~~
../../include/QtCore/../../src/corelib/tools/qstring.h:1388:41: error: request for member ‘size’ in ‘s’, which is of non-class type ‘const int’
{ return fromWCharArray(s.data(), int(s.size())); }
^~~~
Makefile:11170: recipe for target '.obj/qnumeric.o' failed
make[3]: *** [.obj/qnumeric.o] Error 1
make[3]: *** Waiting for unfinished jobs....
Makefile:11015: recipe for target '.obj/qlibraryinfo.o' failed
make[3]: *** [.obj/qlibraryinfo.o] Error 1
Makefile:10846: recipe for target '.obj/qglobal.o' failed
make[3]: *** [.obj/qglobal.o] Error 1
make[3]: Leaving directory '/opt/buildroot-2018.08.2/output/build/qt5base-5.11.1/src/corelib'
Makefile:183: recipe for target 'sub-corelib-make_first' failed
make[2]: *** [sub-corelib-make_first] Error 2
make[2]: Leaving directory '/opt/buildroot-2018.08.2/output/build/qt5base-5.11.1/src'
Makefile:48: recipe for target 'sub-src-make_first' failed
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory '/opt/buildroot-2018.08.2/output/build/qt5base-5.11.1'
package/pkg-generic.mk:229: recipe for target '/opt/buildroot-2018.08.2/output/build/qt5base-5.11.1/.stamp_built' failed
配置了编译Qt5, 发现有编译错误,关于 wstring 的,网上一搜,发现都说 WCHAR 没有配置,可是我明明配置了, 我配置glibc 试一试.
离线
都是大神,学习了
离线
https://whycan.cn/files/members/3/2018-11-09_222924.png
等会把文件buildroot_v3s_whycan.cn.tar.gz分享到 QQ群: 544762792, 约3.4G
晕哥,群咋进不去啊,答案总是不对 - -
离线
晕哥 说:https://whycan.cn/files/members/3/2018-11-09_222924.png
等会把文件buildroot_v3s_whycan.cn.tar.gz分享到 QQ群: 544762792, 约3.4G
晕哥,群咋进不去啊,答案总是不对 - -
是不是用 TIM, 这个软件有bug,用电脑qq或者手机qq
离线
刘少来了 说:晕哥 说:https://whycan.cn/files/members/3/2018-11-09_222924.png
等会把文件buildroot_v3s_whycan.cn.tar.gz分享到 QQ群: 544762792, 约3.4G
晕哥,群咋进不去啊,答案总是不对 - -
是不是用 TIM, 这个软件有bug,用电脑qq或者手机qq
是的,哈哈哈,是说总进不去
离线
要是buildroot里面再加个demo app编译进去就完整了
离线
向大神学习!
离线
zero自从启动网络后,用2018.07的buildroot编译的根文件系统一直错误,入坑太浅,试试大佬的。
离线
下载了,感谢楼主
离线
大佬的这个配置文件可以使用有线网络吗?
离线
最新版的buildroot好像直接有licheepi_zero的配置文件,我来试一下
离线
请问交叉编译工具的版本没有特别要求吧?
与该buildroot工具链相比,荔枝派官网的配置需要指定外部工具链: /opt/gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnueabihf/
最近编辑记录 njitnjit (2020-05-08 22:08:47)
离线
离线
明天按这个来一遍试试看
离线
linaro 的工具链都支持的.
我按照本文指定的流程,现在在编译中,漫长等待。。。。。
编译过程中,大多数时间都是在联网下载dl目录里面的文件。
最近编辑记录 njitnjit (2020-05-08 22:18:51)
离线
为什么我编译的buildroot下载了一大堆东西
离线
【buildroot一键编译】是个好东西!
基于本文,实现一个荔枝派zero音乐MP3播放器(madplay)!
编译环境: VMware Workstation 15 Player + ubuntu-16.04.6-desktop-amd64
原料:buildroot-2018.08.02稳定版
1.获得buildroot源码:
wget https://buildroot.org/downloads/buildroot-2018.08.2.tar.gz
解压:
tar xvzf buildroot-2018.08.2.tar.gz
2.配置linux内核:
cd buildroot-2018.08.2
make menuconfig
Kernel --->
[*] Linux Kernel | |
| | *** Linux kernel in thumb mode may be broken with binutils >= 2.29 *** | |
| | Kernel version (Custom Git repository) ---> | |
| | (https://github.com/Lichee-Pi/linux.git) URL of custom repository | |
| | (zero-4.13.y) Custom repository version | |
| | () Custom kernel patches | |
| | Kernel configuration (Use the architecture default configuration) ---> | |
(注:使用自定义config,即使用根目录.config, 因为要在内核添加减少东西)
Kernel configuration (Use the architecture default configuration)
所以上面这个配置与楼主稍有不同
3. 配置Uboot:
(与楼主一样配置)
4. 配置toolchain:
C library (glibc)
(其余与楼主一样配置)
5. 配置 System configuration:
System configuration --->
Root FS skeleton (default target skeleton) ---> | |
| | (buildroot) System hostname | |
| | (Welcome to Buildroot) System banner | |
| | Passwords encoding (md5) ---> | |
| | Init system (BusyBox) ---> | |
| | /dev management (Dynamic using devtmpfs + mdev) ---> | |
| | (system/device_table.txt) Path to the permission tables | |
| | [ ] support extended attributes in device tables | |
| | [ ] Use symlinks to /usr for /bin, /sbin and /lib | |
| | [*] Enable root login with password | |
| | () Root password | |
| | /bin/sh (busybox' default shell) ---> | |
| | [*] Run a getty (login prompt) after boot ---> | |
6. 配置 Target packages:
--- Audio and video applications
[*] alsa-utils ---> | |
| | [*] madplay | |
6. 编译buildroot:
output/images/目录会下生成:rootfs.tar sun8i-v3s-licheepi-zero.dtb zImage
配置和编译内核时,要注意的是:
(此时在 buildroot-2018.08.2/output/build/linux-zero-4.13.y/ 目录下)
【坑】:千万不要在这个内核源码根目录中直接使用:make menuconfig !!! 因为这样会改变.config 里面东西,导致生成的zImage无法启动。
【解决方法】:
我目前做法是,使用buildroot的工具链的同时,也配置一个外部交叉编译工具链gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf,然后 使用 make ARCH=arm menuconfig:
修改了设备树文件dts后,编译buildroot,发现无法生成dtb文件,要注意的是:
删除 kernel源码目录下 .stamp* 文件(时间短,行不行看实际情况),或者直接make clean(时间长,但相对可靠)。
7. 烧录SD卡,启动,登录串口终端OK后,
直接用: madplay *.mp3 发现耳机无声音,
需要首先设置: amixer -c 0 sset 'Headphone',0 50% unmute
然后madplay *.mp3 就可以播放音乐了!
播放串口控制台效果如下,音乐?脑补
# mount /dev/sda1 /mnt
[ 6125.335919] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
# cd /mnt/
# amixer -c 0 sset 'Headphone',0 50% unmute
Simple mixer control 'Headphone',0
Capabilities: pvolume pvolume-joined pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 63
Mono:
Front Left: Playback 32 [51%] [-31.00dB] [on]
Front Right: Playback 32 [51%] [-31.00dB] [on]
# madplay *.mp3
MPEG Audio Decoder 0.15.2 (beta) - Copyright (C) 2000-2004 Robert Leslie et al.
>> ??,??? - ??????.mp3
Title: 贩贩贩
Artist: 贩/贩
Album: 贩 贩贩
Track: 2
Comment: 163 key(Don't
modify):L64FU3W4YxX3ZFTmbZ+8/RcZFBSDF9Ipjmo8Xpgi3ObZ4OvvUWVFWQsm6HXGw6VhW5mtRmGvRfv0h0eLFjkv6ebgfYb7usutJX3mH1QAwm2pzqkns/hDFSJjERsY0+Ax4AXwPfrqvJbsyajUvhAkJLpZ0a08iI2Ugqwz7QwPh1LW+dMLcYJdnBu7MWv2cOnrruhL91oRpejzoIIB8pEwLbcbd5f6ptYSo6GbuEOV96END56Ut+xRCsb2LssL/Worxe4Jfb3dBnZJF1jod/6k9DGHT4wXDAp8sqiV33/JLWE3bT61oK8+Lj+31xdv22mP3ouhs7TiMvJf8oOL0vAjIbiNyJ4BwRATJUe4XMISA9BDJFJbc5Mm7zJZq5vBnFs5ww9K3mSeMCV/a2W7utVrEm6gZgAeBQTPZBMRsIjEwhqrZje6R8PPJuR8/6cHfbdFai/Gw/0y6DY3Hg8QhIoWwvFcvPO5rbdND3tjEJw523lgR2uT9JqLgLIWZ/ISiryZX6lnv4T8xJcOVAl/vfjM/RyreeNz1R7DHoE6w6YENbWaBrXCSZiQ/T/zS27TmKTAx1LTOEPZPrW8tAXCYG07UemFEQAcokR0OgiObb7cc0I=
最近编辑记录 njitnjit (2020-05-09 23:17:48)
离线
挺实用的脚步,写得非常好
离线
请问这个编译完多大呢,想弄一个10M以下得
离线
谢谢分享,【buildroot一键编译】真的很实用,正在尝试编译中
离线
感谢分享,新手跟着走一遍试试。
离线
编译过几次了,但是都是胡乱设置一通,跟着楼主的方法走走试试,算是做练习了
离线
感谢分享,优质的发帖需要顶,谢谢,学习了
离线
收藏起来看下, 谢谢分享
离线
谢谢分享,学习了
离线
一键编译过程中,出现了这个错误。
file(sun8i-v3s-licheepi-zero-dock.dtb): stat(/home/jig/lichee_zero/buildroot-2020.05/output/images/sun8i-v3s-licheepi-zero-dock.dtb) failed: No such file or directory
是不是menuconfig没配置好?
离线
然后在别处找来sun8i-v3s-licheepi-zero-dock.dtb 复制进了目录,通过了这一步。又出现file(boot.scr): stat(/home/jig/lichee_zero/buildroot-2020.05/output/images/boot.scr) failed: No such file or directory,求助各位大神,问题处在哪里?多谢多谢
离线
感谢分享,准备按步骤试试
离线
感謝分享,來測試看看
离线
感谢分享,这就试试。。。
离线
离线
离线
离线
离线
下载Linux源码出错。
>>> linux-headers zero-4.13.y Downloading
Reinitialized existing Git repository in /home/sinlinx/code/licheepi-zero/buildroot-2018.08.2/dl/linux/git/.git/
Fetching all references
ssh: Could not resolve hostname https: Name or service not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Detected a corrupted git cache.
Removing it and starting afresh.
Initialized empty Git repository in /home/sinlinx/code/licheepi-zero/buildroot-2018.08.2/dl/linux/git/.git/
Fetching all references
ssh: Could not resolve hostname https: Name or service not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Detected a corrupted git cache.
This is the second time in a row; bailing out
--2022-08-27 21:14:37-- http://sources.buildroot.net/linux/linux-zero-4.13.y.tar.gz
Resolving sources.buildroot.net (sources.buildroot.net)... 172.67.72.56, 104.26.0.37, 104.26.1.37, ...
Connecting to sources.buildroot.net (sources.buildroot.net)|172.67.72.56|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-08-27 21:14:38 ERROR 404: Not Found.
问题解决,写错了git地址
最近编辑记录 jjwly (2022-08-28 12:31:42)
离线
@jjwly
我下载>>> linux-headers 的时候也经常出现没反应,你有处理的方法吗
离线
找了好久,不知道要怎么烧录,
离线
大佬,我编译后,报了很多:Warning: host file "./lib/gcc/arm-buildroot-linux-uclibcgnueabihf/7.3.0/plugin/include/tm-preds.h" is touched by more than one package: [u'host-gcc-initial', u'host-gcc-final']
离线