-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
90 changed files
with
466 additions
and
801 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
devices/amlogic_meson8b/diy/target/linux/amlogic/image/boot.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# 设置环境变量 | ||
setenv condev "console=ttyAML0,115200n8 no_console_suspend consoleblank=0" | ||
setenv kernel_loadaddr "0x00208000" | ||
setenv dtb_loadaddr "0x21800000" | ||
setenv initrd_loadaddr "0x22000000" | ||
setenv dtb_name "dtb" | ||
setenv boot_start "bootm ${kernel_loadaddr} - ${dtb_loadaddr}" | ||
|
||
# 设置 bootargs_emmc 环境变量 | ||
setenv bootargs_emmc "root=/dev/mmcblk1p2 rootwait ro ${condev} fsck.repair=yes net.ifnames=0" | ||
|
||
# 尝试加载并启动系统 | ||
if fatload mmc 1 ${initrd_loadaddr} uInitrd && | ||
setenv bootargs ${bootargs_emmc} && | ||
fatload mmc 1 ${kernel_loadaddr} uImage && | ||
fatload mmc 1 ${dtb_loadaddr} ${dtb_name}; then | ||
run boot_start | ||
fi |
35 changes: 35 additions & 0 deletions
35
devices/amlogic_meson8b/diy/target/linux/amlogic/image/gen_aml_emmc_img.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# 检查参数数量 | ||
if [ "$#" -ne 5 ]; then | ||
echo "Usage: $0 <output_image> <boot_partition_image> <rootfs_image>" | ||
exit 1 | ||
fi | ||
|
||
OUTPUT_IMAGE=$1 | ||
BOOT_PARTITION_IMAGE=$2 | ||
ROOTFS_IMAGE=$3 | ||
|
||
|
||
# 下载并准备工具 | ||
ver="v0.3.1" | ||
curl -L -o ./AmlImg https://github.com/hzyitc/AmlImg/releases/download/$ver/AmlImg_${ver}_linux_amd64 | ||
chmod +x ./AmlImg | ||
curl -L -o ./uboot.img https://github.com/shiyu1314/u-boot-onecloud/releases/download/build-20230901-0443/eMMC.burn.img | ||
./AmlImg unpack ./uboot.img burn/ | ||
|
||
# 转换镜像格式 | ||
img2simg ${BOOT_PARTITION_IMAGE} burn/boot.simg | ||
img2simg ${ROOTFS_IMAGE} burn/rootfs.simg | ||
|
||
# 创建命令文件 | ||
cat <<EOF >>burn/commands.txt | ||
PARTITION:boot:sparse:boot.simg | ||
PARTITION:rootfs:sparse:rootfs.simg | ||
EOF | ||
|
||
# 打包生成最终镜像 | ||
./AmlImg pack ${OUTPUT_IMAGE} burn/ | ||
|
||
# 清理临时文件夹 | ||
rm -rf burn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
--- a/target/linux/amlogic/image/Makefile | ||
+++ b/target/linux/amlogic/image/Makefile | ||
@@ -49,7 +49,8 @@ endef | ||
--- a/target/linux/amlogic/image/meson8b.mk | ||
+++ b/target/linux/amlogic/image/meson8b.mk | ||
@@ -1,7 +1,7 @@ | ||
|
||
define Device/Default | ||
FILESYSTEMS := ext4 | ||
- IMAGES := emmc.img | ||
+ IMAGES := emmc_burn.img | ||
KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts) | ||
KERNEL_LOADADDR := 0x01080000 | ||
KERNEL_NAME := Image | ||
@@ -11,7 +11,8 @@ endef | ||
|
||
define Device/thunder-onecloud | ||
DEVICE_DTS := meson8b-onecloud | ||
- DEVICE_TITLE := Thunder OneCloud | ||
+ DEVICE_TITLE := OneCloud 玩客云 | ||
+ DEVICE_PACKAGES += kmod-usb-net-rtl8152 | ||
KERNEL_LOADADDR := 0x00208000 | ||
IMAGE/emmc_burn.img := boot-script onecloud | emmc-common $$(DEVICE_NAME) | ||
IMAGE/emmc.img := boot-script onecloud | emmc-common $$(DEVICE_NAME) | ||
endef |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,3 @@ | |
shopt -s extglob | ||
|
||
SHELL_FOLDER=$(dirname $(readlink -f "$0")) | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.