Skip to content

Commit

Permalink
Adjust file storage plan
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Sep 20, 2021
1 parent d538c4a commit c1fa5a1
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 107 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build-armbian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ jobs:
run: |
sudo chmod +x make kernel.sh
sudo ./make s905x3_s905d_s922x_s905x2_s912
#sudo ./kernel.sh
cd ./build/output/images && sudo gzip *.img
echo "FILEPATH=$PWD" >> $GITHUB_ENV
echo "FILE_DATE=$(date +"%Y.%m.%d.%H%M")" >> $GITHUB_ENV
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/use-releases-file-to-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ jobs:
cd ./build/output/images && gzip -df *.img.gz && sync && cd ../../../
sudo chmod +x make kernel.sh
sudo ./make s905x3_s905d_s922x_s905x2_s912
#sudo ./kernel.sh
cd ./build/output/images && sudo gzip *.img
echo "FILEPATH=$PWD" >> $GITHUB_ENV
echo "FILE_DATE=$(date +"%Y.%m.%d.%H%M")" >> $GITHUB_ENV
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,18 @@ armbian-update

- compile `a single soc` can be directly input `sudo ./make s905d`. When `multiple soc` is compiled at the same time, please use `_` to connect multiple soc, such as `sudo ./make s905d_s905x3_s922x`

1. Workflows configuration in [build-armbian.yml](.github/workflows/build-armbian.yml) file.

2. Select ***`Build Armbian For Amlogic`*** on the [Action](https://github.com/ophub/amlogic-s9xxx-armbian/actions) page. Click the ***`Run workflow`*** button.

```yaml
sudo ./make s905x3_s905x2_s905x_s905w_s905d_s922x_s912
```

## Kernel
## Update Kernel

- The kernels of `amlogic s9xxx armbian` and `amlogic s9xxx openwrt` are common, you can directly use the [kernel](https://github.com/ophub/flippy-kernel) compiled by flippy to to `update armbian`.

- In the same way, you can also extract the kernel for openwrt from the armbian, The extracted kernel storage path in the `build/output/images` directory, and the file name is `amlogic-s9xxx-openwrt-kernel-*.tar.gz`. The kernel can be used in the [amlogic-s9xxx-openwrt](https://github.com/ophub/amlogic-s9xxx-openwrt/tree/main/amlogic-s9xxx/amlogic-kernel).

## Acknowledgments

The [armbian](https://github.com/armbian/build) directly calls the official source code for compilation, The `u-boot` uses related resources developed by [flippy](https://github.com/unifreq/openwrt_packit) for `amlogic s9xxx openwrt`. The compilation ideas refer to the tutorial of [ebkso](https://www.kflyo.com/howto-compile-armbian-for-n1-box), thanks.
Expand Down
99 changes: 0 additions & 99 deletions kernel.sh

This file was deleted.

15 changes: 12 additions & 3 deletions make
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
#===== Do not modify the following parameter settings, Start =====
make_path=${PWD}
armbian_outputpath=${make_path}/build/output/images
armbian_path=${make_path}/amlogic-s9xxx
configfiles_path=${armbian_path}/common-files
amlogic_path=${make_path}/amlogic-s9xxx
armbian_path=${amlogic_path}/amlogic-armbian
dtb_path=${amlogic_path}/amlogic-dtb
uboot_path=${amlogic_path}/amlogic-u-boot
configfiles_path=${amlogic_path}/common-files
tmp_outpath=${make_path}/tmp_out
tmp_armbian=${make_path}/tmp_armbian
tmp_build=${make_path}/tmp_build
Expand Down Expand Up @@ -172,6 +175,7 @@ copy_files() {
cd ${make_path}

mkdir -p ${tmp_build}/boot
# Copy the original boot core file
cp -f ${tmp_armbian}/boot/config-* ${tmp_build}/boot
cp -f ${tmp_armbian}/boot/initrd.img-* ${tmp_build}/boot
cp -f ${tmp_armbian}/boot/System.map-* ${tmp_build}/boot
Expand All @@ -180,7 +184,12 @@ copy_files() {
cp -f ${tmp_armbian}/boot/uInitrd-* ${tmp_build}/boot/uInitrd
cp -f ${tmp_armbian}/boot/vmlinuz-* ${tmp_build}/boot/zImage
chmod +x ${tmp_build}/boot/*
tar -xzf "${armbian_path}/amlogic-armbian/boot-common.tar.gz" -C ${tmp_build}/boot
# Unzip the relevant files in the boot directory
tar -xzf "${armbian_path}/boot-common.tar.gz" -C ${tmp_build}/boot
# Complete the u-boot file to facilitate the booting of the 5.10+ kernel
cp -f ${uboot_path}/* ${tmp_build}/boot
# Complete the dtb file
cp -f ${dtb_path}/* ${tmp_build}/boot/dtb/amlogic
sync

tag_bootfs="${tmp_outpath}/bootfs"
Expand Down

0 comments on commit c1fa5a1

Please sign in to comment.