mirror of
https://e.coding.net/weidongshan/01_all_series_quickstart.git
synced 2025-11-04 04:56:22 +08:00
发布12_系统裁剪与移植_根文件系统
This commit is contained in:
BIN
12_系统裁剪与移植_根文件系统/01_使用Busybox制作根文件系统/busybox-1.31.1.tar.bz2
Normal file
BIN
12_系统裁剪与移植_根文件系统/01_使用Busybox制作根文件系统/busybox-1.31.1.tar.bz2
Normal file
Binary file not shown.
BIN
12_系统裁剪与移植_根文件系统/01_使用Busybox制作根文件系统/busybox.tif
Normal file
BIN
12_系统裁剪与移植_根文件系统/01_使用Busybox制作根文件系统/busybox.tif
Normal file
Binary file not shown.
17
12_系统裁剪与移植_根文件系统/01_使用Busybox制作根文件系统/genimage.cfg
Normal file
17
12_系统裁剪与移植_根文件系统/01_使用Busybox制作根文件系统/genimage.cfg
Normal file
@@ -0,0 +1,17 @@
|
||||
image emmc.img {
|
||||
hdimage { // Generates DOS partition images.
|
||||
|
||||
}
|
||||
|
||||
partition rootfs-1 {
|
||||
partition-type = 0xC
|
||||
bootable = "yes"
|
||||
size = 10M // 分区大小为10M
|
||||
}
|
||||
partition rootfs-2 {
|
||||
partition-type = 0x83
|
||||
bootable = "yes"
|
||||
image = "rootfs.ext4" // 这个分区里直接写入映像文件myrootfs.ext4
|
||||
size = 1000M // 分区大小为100M
|
||||
}
|
||||
|
||||
BIN
12_系统裁剪与移植_根文件系统/01_使用Busybox制作根文件系统/使用Busybox制作根文件系统.pdf
Normal file
BIN
12_系统裁剪与移植_根文件系统/01_使用Busybox制作根文件系统/使用Busybox制作根文件系统.pdf
Normal file
Binary file not shown.
BIN
12_系统裁剪与移植_根文件系统/02_使用Buildroot制作根文件系统/buildroot.tif
Normal file
BIN
12_系统裁剪与移植_根文件系统/02_使用Buildroot制作根文件系统/buildroot.tif
Normal file
Binary file not shown.
BIN
12_系统裁剪与移植_根文件系统/02_使用Buildroot制作根文件系统/使用Buildroot制作根文件系统.pdf
Normal file
BIN
12_系统裁剪与移植_根文件系统/02_使用Buildroot制作根文件系统/使用Buildroot制作根文件系统.pdf
Normal file
Binary file not shown.
2936
12_系统裁剪与移植_根文件系统/02_使用Buildroot制作根文件系统/源码/Config.in
Normal file
2936
12_系统裁剪与移植_根文件系统/02_使用Buildroot制作根文件系统/源码/Config.in
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,17 @@
|
||||
image emmc.img {
|
||||
hdimage { // Generates DOS partition images.
|
||||
|
||||
}
|
||||
|
||||
partition rootfs-1 {
|
||||
partition-type = 0xC
|
||||
bootable = "yes"
|
||||
size = 10M // 分区大小为10M
|
||||
}
|
||||
partition rootfs-2 {
|
||||
partition-type = 0x83
|
||||
bootable = "yes"
|
||||
image = "rootfs.ext4" // 这个分区里直接写入映像文件myrootfs.ext4
|
||||
size = 1000M // 分区大小为100M
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
asfasdsa
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,125 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# dtb_list extracts the list of DTB files from BR2_LINUX_KERNEL_INTREE_DTS_NAME
|
||||
# in ${BR_CONFIG}, then prints the corresponding list of file names for the
|
||||
# genimage configuration file
|
||||
#
|
||||
dtb_list()
|
||||
{
|
||||
local DTB_LIST
|
||||
|
||||
DTB_LIST="$(sed -n 's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([\/a-z0-9 \-]*\)"$/\1/p' "${BR2_CONFIG}")"
|
||||
|
||||
for dt in $DTB_LIST; do
|
||||
echo -n "\"$(basename "${dt}").dtb\", "
|
||||
done
|
||||
}
|
||||
|
||||
#
|
||||
# linux_image extracts the Linux image format from BR2_LINUX_KERNEL_UIMAGE in
|
||||
# ${BR_CONFIG}, then prints the corresponding file name for the genimage
|
||||
# configuration file
|
||||
#
|
||||
linux_image()
|
||||
{
|
||||
if grep -Eq "^BR2_LINUX_KERNEL_UIMAGE=y$" "${BR2_CONFIG}"; then
|
||||
echo "\"uImage\""
|
||||
elif grep -Eq "^BR2_LINUX_KERNEL_IMAGE=y$" "${BR2_CONFIG}"; then
|
||||
echo "\"Image\""
|
||||
elif grep -Eq "^BR2_LINUX_KERNEL_IMAGEGZ=y$" "${BR2_CONFIG}"; then
|
||||
echo "\"Image.gz\""
|
||||
else
|
||||
echo "\"zImage\""
|
||||
fi
|
||||
}
|
||||
|
||||
genimage_type()
|
||||
{
|
||||
if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8=y$" "${BR2_CONFIG}"; then
|
||||
echo "genimage.cfg.template_imx8"
|
||||
elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" "${BR2_CONFIG}"; then
|
||||
echo "genimage.cfg.template_imx8"
|
||||
elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM=y$" "${BR2_CONFIG}"; then
|
||||
echo "genimage.cfg.template_imx8"
|
||||
elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN=y$" "${BR2_CONFIG}"; then
|
||||
echo "genimage.cfg.template_imx8"
|
||||
elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MP=y$" "${BR2_CONFIG}"; then
|
||||
echo "genimage.cfg.template_imx8"
|
||||
elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X=y$" "${BR2_CONFIG}"; then
|
||||
echo "genimage.cfg.template_imx8"
|
||||
elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8DXL=y$" "${BR2_CONFIG}"; then
|
||||
echo "genimage.cfg.template_imx8"
|
||||
elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91=y$" "${BR2_CONFIG}"; then
|
||||
echo "genimage.cfg.template_imx9"
|
||||
elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93=y$" "${BR2_CONFIG}"; then
|
||||
echo "genimage.cfg.template_imx9"
|
||||
elif grep -Eq "^BR2_LINUX_KERNEL_INSTALL_TARGET=y$" "${BR2_CONFIG}"; then
|
||||
if grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" "${BR2_CONFIG}"; then
|
||||
echo "genimage.cfg.template_no_boot_part_spl"
|
||||
else
|
||||
echo "genimage.cfg.template_no_boot_part"
|
||||
fi
|
||||
elif grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" "${BR2_CONFIG}"; then
|
||||
echo "genimage.cfg.template_spl"
|
||||
else
|
||||
echo "genimage.cfg.template"
|
||||
fi
|
||||
}
|
||||
|
||||
imx_offset()
|
||||
{
|
||||
if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" "${BR2_CONFIG}"; then
|
||||
echo "33K"
|
||||
elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM=y$" "${BR2_CONFIG}"; then
|
||||
echo "33K"
|
||||
else
|
||||
echo "32K"
|
||||
fi
|
||||
}
|
||||
|
||||
uboot_image()
|
||||
{
|
||||
if grep -Eq "^BR2_TARGET_UBOOT_FORMAT_DTB_IMX=y$" "${BR2_CONFIG}"; then
|
||||
echo "u-boot-dtb.imx"
|
||||
elif grep -Eq "^BR2_TARGET_UBOOT_FORMAT_IMX=y$" "${BR2_CONFIG}"; then
|
||||
echo "u-boot.imx"
|
||||
elif grep -Eq "^BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y$" "${BR2_CONFIG}"; then
|
||||
echo "u-boot-dtb.img"
|
||||
elif grep -Eq "^BR2_TARGET_UBOOT_FORMAT_IMG=y$" "${BR2_CONFIG}"; then
|
||||
echo "u-boot.img"
|
||||
fi
|
||||
}
|
||||
|
||||
main()
|
||||
{
|
||||
local FILES IMXOFFSET UBOOTBIN GENIMAGE_CFG GENIMAGE_TMP
|
||||
FILES="$(dtb_list) $(linux_image)"
|
||||
IMXOFFSET="$(imx_offset)"
|
||||
UBOOTBIN="$(uboot_image)"
|
||||
GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)"
|
||||
GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
|
||||
|
||||
sed -e "s/%FILES%/${FILES}/" \
|
||||
-e "s/%IMXOFFSET%/${IMXOFFSET}/" \
|
||||
-e "s/%UBOOTBIN%/${UBOOTBIN}/" \
|
||||
"board/freescale/common/imx/$(genimage_type)" > "${GENIMAGE_CFG}"
|
||||
|
||||
rm -rf "${GENIMAGE_TMP}"
|
||||
|
||||
cp board/freescale/100ask/genimage.cfg "${GENIMAGE_CFG}"
|
||||
cat "${GENIMAGE_CFG}"
|
||||
|
||||
genimage \
|
||||
--rootpath "${TARGET_DIR}" \
|
||||
--tmppath "${GENIMAGE_TMP}" \
|
||||
--inputpath "${BINARIES_DIR}" \
|
||||
--outputpath "${BINARIES_DIR}" \
|
||||
--config "${GENIMAGE_CFG}"
|
||||
|
||||
rm -f "${GENIMAGE_CFG}"
|
||||
|
||||
exit $?
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
config BR2_PACKAGE_HELLO_CMAKE
|
||||
bool "hello_cmake"
|
||||
help
|
||||
hello_cmake for test.
|
||||
@@ -0,0 +1,11 @@
|
||||
################################################################################
|
||||
#
|
||||
# hello_cmake
|
||||
#
|
||||
################################################################################
|
||||
|
||||
HELLO_CMAKE_SOURCE =hello_cmake.tar.bz2
|
||||
HELLO_CMAKE_SITE =$(TOPDIR)/dl/hello_cmake
|
||||
|
||||
|
||||
$(eval $(cmake-package))
|
||||
@@ -0,0 +1,4 @@
|
||||
config BR2_PACKAGE_HELLO_MAKE
|
||||
bool "hello_make"
|
||||
help
|
||||
hello_make for test.
|
||||
@@ -0,0 +1,18 @@
|
||||
################################################################################
|
||||
#
|
||||
# hello_make
|
||||
#
|
||||
################################################################################
|
||||
|
||||
HELLO_MAKE_SOURCE =hello_make.tar.gz
|
||||
HELLO_MAKE_SITE =$(TOPDIR)/dl/hello_make
|
||||
|
||||
define HELLO_MAKE_BUILD_CMDS
|
||||
$(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D)
|
||||
endef
|
||||
|
||||
define HELLO_MAKE_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -D -m 0755 $(@D)/hello_make $(TARGET_DIR)/usr/bin
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
BIN
12_系统裁剪与移植_根文件系统/02_使用Buildroot制作根文件系统/百问网一张图教你理解Buildroot系统.jpg
Normal file
BIN
12_系统裁剪与移植_根文件系统/02_使用Buildroot制作根文件系统/百问网一张图教你理解Buildroot系统.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
Reference in New Issue
Block a user