|
1. 下载buildroot,按照视频教程buildroot章节下载
ning@ubuntu:~/microchip/sam9x60/software$ git clone https://github.com/buildroot/buildroot.git
Cloning into 'buildroot'...
remote: Enumerating objects: 491236, done.
remote: Counting objects: 100% (1612/1612), done.
remote: Compressing objects: 100% (798/798), done.
remote: Total 491236 (delta 831), reused 1488 (delta 813), pack-reused 489624
Receiving objects: 100% (491236/491236), 157.32 MiB | 15.98 MiB/s, done.
Resolving deltas: 100% (323220/323220), done.
ning@ubuntu:~/microchip/sam9x60/software$
ning@ubuntu:~/microchip/sam9x60/software$ git clone https://github.com/linux4sam/buildroot-external-microchip.git
Cloning into 'buildroot-external-microchip'...
remote: Enumerating objects: 7987, done.
remote: Counting objects: 100% (1982/1982), done.
remote: Compressing objects: 100% (460/460), done.
remote: Total 7987 (delta 1520), reused 1822 (delta 1470), pack-reused 6005
Receiving objects: 100% (7987/7987), 1.13 MiB | 2.06 MiB/s, done.
Resolving deltas: 100% (5914/5914), done.
2.按照配置章节配置
ning@ubuntu:~/microchip/sam9x60/software$ ls
buildroot buildroot-external-microchip buildroot-external-microchip.tar.gz buildroot.tar.gz
ning@ubuntu:~/microchip/sam9x60/software$
ning@ubuntu:~/microchip/sam9x60/software$ cd buildroot
ning@ubuntu:~/microchip/sam9x60/software/buildroot$
ning@ubuntu:~/microchip/sam9x60/software/buildroot$ git tag | grep 2022
2022.02
2022.02-rc1
2022.02-rc2
2022.02-rc3
2022.02.1
2022.02.2
2022.02.3
2022.02.4
2022.02.5
2022.02.6
2022.02.7
2022.02.8
2022.05
2022.05-rc1
2022.05-rc2
2022.05.1
2022.05.2
2022.05.3
2022.08
2022.08-rc1
2022.08-rc2
2022.08.1
2022.08.2
2022.08.3
2022.11
2022.11-rc1
2022.11-rc2
2022.11-rc3
ning@ubuntu:~/microchip/sam9x60/software/buildroot$
ning@ubuntu:~/microchip/sam9x60/software/buildroot$ git checkout 2022.02.8
Note: switching to '2022.02.8'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 6c872197f4 Update for 2022.02.8
ning@ubuntu:~/microchip/sam9x60/software/buildroot$
ning@ubuntu:~/microchip/sam9x60/software/buildroot$ cd ../buildroot-external-microchip/
ning@ubuntu:~/microchip/sam9x60/software/buildroot-external-microchip$
ning@ubuntu:~/microchip/sam9x60/software/buildroot-external-microchip$ git tag | grep 2022
linux4microchip-2022.10
linux4microchip-2022.10-rc1
linux4microchip-2022.10-rc2
linux4microchip-2022.10-rc3
linux4microchip-2022.10-rc4
linux4sam+egt-1.4-2022.04
linux4sam-2022.04
linux4sam-2022.04-rc2
linux4sam-2022.04-rc3
linux4sam-2022.04-rc4
linux4sam-2022.04-rc5
sam9x60-curiosity-2022.07
sam9x60_curiosity-2022.07-rc1
ning@ubuntu:~/microchip/sam9x60/software/buildroot-external-microchip$
ning@ubuntu:~/microchip/sam9x60/software/buildroot-external-microchip$ git checkout linux4microchip-2022.10
Note: switching to 'linux4microchip-2022.10'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at dd856be package/egt*: correctly bump egt-thermostat to 1.4
ning@ubuntu:~/microchip/sam9x60/software/buildroot-external-microchip$
ning@ubuntu:~/microchip/sam9x60/software/buildroot-external-microchip$ ls ./configs/
at91sam9x5ek_headless_defconfig sama5d27_som1_ek_nodered_defconfig sama5d2_ptc_ek_nodered_defconfig sama5d3_xplained_headless_defconfig
icicle_defconfig sama5d27_som1_ek_optee_graphics_defconfig sama5d2_xplained_graphics_defconfig sama5d3_xplained_nodered_defconfig
sam9x60_curiosity_graphics_defconfig sama5d27_som1_ek_optee_headless_defconfig sama5d2_xplained_headless_defconfig sama5d4_xplained_graphics_defconfig
sam9x60_curiosity_headless_defconfig sama5d27_wlsom1_ek_graphics_defconfig sama5d2_xplained_nodered_defconfig sama5d4_xplained_headless_defconfig
sam9x60ek_graphics_defconfig sama5d27_wlsom1_ek_headless_defconfig sama5d2_xplained_optee_graphics_defconfig sama5d4_xplained_headless_wilc_defconfig
sam9x60ek_headless_defconfig sama5d2_icp_headless_defconfig sama5d2_xplained_optee_headless_defconfig sama5d4_xplained_nodered_defconfig
sama5d27_som1_ek_graphics_defconfig sama5d2_ptc_ek_graphics_defconfig sama5d3_eds_headless_defconfig sama7g5ek_headless_defconfig
sama5d27_som1_ek_headless_defconfig sama5d2_ptc_ek_headless_defconfig sama5d3_xplained_graphics_defconfig
ning@ubuntu:~/microchip/sam9x60/software/buildroot-external-microchip$
ning@ubuntu:~/microchip/sam9x60/software/buildroot-external-microchip$ make O=$PWD BR2_EXTERNAL=$PWD -C ../buildroot sam9x60_curiosity_headless_defconfig
make: Entering directory '/home/ning/microchip/sam9x60/software/buildroot'
mkdir -p /home/ning/microchip/sam9x60/software/buildroot-external-microchip/build/buildroot-config/lxdialog
PKG_CONFIG_PATH="" make CC="/usr/bin/gcc" HOSTCC="/usr/bin/gcc" \
obj=/home/ning/microchip/sam9x60/software/buildroot-external-microchip/build/buildroot-config -C support/kconfig -f Makefile.br conf
/usr/bin/gcc -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -I/home/ning/microchip/sam9x60/software/buildroot-external-microchip/build/buildroot-config -DCONFIG_=\"\" -MM *.c > /home/ning/microchip/sam9x60/software/buildroot-external-microchip/build/buildroot-config/.depend 2>/dev/null || :
/usr/bin/gcc -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -I/home/ning/microchip/sam9x60/software/buildroot-external-microchip/build/buildroot-config -DCONFIG_=\"\" -c conf.c -o /home/ning/microchip/sam9x60/software/buildroot-external-microchip/build/buildroot-config/conf.o
/usr/bin/gcc -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -I/home/ning/microchip/sam9x60/software/buildroot-external-microchip/build/buildroot-config -DCONFIG_=\"\" -I. -c /home/ning/microchip/sam9x60/software/buildroot-external-microchip/build/buildroot-config/zconf.tab.c -o /home/ning/microchip/sam9x60/software/buildroot-external-microchip/build/buildroot-config/zconf.tab.o
/usr/bin/gcc -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE -I/home/ning/microchip/sam9x60/software/buildroot-external-microchip/build/buildroot-config -DCONFIG_=\"\" /home/ning/microchip/sam9x60/software/buildroot-external-microchip/build/buildroot-config/conf.o /home/ning/microchip/sam9x60/software/buildroot-external-microchip/build/buildroot-config/zconf.tab.o -o /home/ning/microchip/sam9x60/software/buildroot-external-microchip/build/buildroot-config/conf
rm /home/ning/microchip/sam9x60/software/buildroot-external-microchip/build/buildroot-config/zconf.tab.c
GEN /home/ning/microchip/sam9x60/software/buildroot-external-microchip/Makefile
#
# configuration written to /home/ning/microchip/sam9x60/software/buildroot-external-microchip/.config
#
make: Leaving directory '/home/ning/microchip/sam9x60/software/buildroot'
3. 在buildroot-external-microchip目录中,make menuconfig --> Build options-->Mirrors and Download locations 修改下载路径为国内源(也可以把dl.tar.gz解压到buildroot目录,git checkout 版本不同,dl下载内容不同)
BR2_BACKUP_SITE="http://sources.buildroot.net"
BR2_KERNEL_MIRROR="linux-kernel安装包下载_开源镜像站-阿里云"
BR2_GNU_MIRROR="gnu安装包下载_开源镜像站-阿里云"
BR2_LUAROCKS_MIRROR="https://luarocks.cn"
BR2_CPAN_MIRROR="The Comprehensive Perl Archive Network - www.cpan.org"
或,
BR2_BACKUP_SITE="http://sources.buildroot.net"
BR2_KERNEL_MIRROR="https://mirrors.ustc.edu.cn/kernel.org"
BR2_GNU_MIRROR="Index of /gnu/"
BR2_LUAROCKS_MIRROR="https://luarocks.cn"
BR2_CPAN_MIRROR="https://mirrors.ustc.edu.cn/CPAN"

3.make -j4开始编译(过程中会下载很多软件包,需要网络良好,否则会失败,dl.tar.gz解压可以省去下载过程)
4. 编译完成后如下图,会在buildroot-external-microchip/image目录生成固件

3536




被折叠的 条评论
为什么被折叠?



