Closed dinhchinh82 closed 2 years ago
rk3328 does not need u-boot, they use the mainline kernel, which is easier and easier to use than amlogic, you can refer to the practice of OpenWrt.
rk3328 does not need u-boot, they use the mainline kernel, which is easier and easier to use than amlogic, you can refer to the practice of OpenWrt.
Should I download the kernel & uboot file from Flippy then replace the files in your Amlogic build?
No, delete u-boot and bootloader related code, ignore this
Kernel difference, uEnv.txt change to armbianEnv.txt
for btrfs:
cat > armbianEnv.txt <<EOF
verbosity=7
overlay_prefix=rockchip
rootdev=UUID=${ROOTFS_UUID}
rootfstype=btrfs
rootflags=compress=zstd:6
extraargs=usbcore.autosuspend=-1
extraboardargs=
fdtfile=/dtb/rockchip/${FDTFILE}
EOF
Remove codes:
@ophub great. I will remove the code from amlogic-s9xxx-armbian/rebuild file according to your guide and try to build again.
@ophub I've removed 2 parts of code from rebuild script according to your guide. https://github.com/dinhchinh82/amlogic-s9xxx-armbian/blob/3328/rebuild
By the way, I don't understand what I should do with this one:
https://github.com/ophub/luci-app-amlogic/blob/daef961acf0085c2e732c199d554494ea754341a/luci-app-amlogic/root/usr/sbin/openwrt-kernel#L36
I'm trying to build as setting below:
https://github.com/unifreq/openwrt_packit/blob/master/mk_rk3328_beikeyun.sh
You can learn his packaging script
https://github.com/unifreq/openwrt_packit/blob/master/mk_rk3328_beikeyun.sh
You can learn his packaging script
I already read Flippy script but I don't understand how to run that script on Github action.
So I'm thinking that it's better to reuse your script to make it work via Github action. That's reason I make this issue.
I just got failed on Github action why trying to rebuild armbian:
@ophub could you help me to check the rebuild script that I updated according to your one:
https://github.com/dinhchinh82/amlogic-s9xxx-armbian/blob/3328/rebuild
I already added according to your base:
dinhchinh82/amlogic-s9xxx-armbian@main
@ophub what should I do with the files above? Should I fork unifreq/openwrt_packit/ and build again from my repo?
Or should I copy the snippet code above to put into the rebuild file as below? https://github.com/dinhchinh82/amlogic-s9xxx-armbian/blob/131cf8dc7972b111241cfb5c3e65fa4d3d85da4f/rebuild#L489
This has the corresponding code in amlogic. You add judgment in the relevant part, refer to his judgment
if [ "${soc}" == "rk3328" ]; then
……
else
……
fi
This has the corresponding code in amlogic. You add judgment in the relevant part, refer to his judgment
I just confused which source code file should I modify from your base source code to add the snippet code you mentioned above?
What I expect to do is building Armbian for RK3328 on Github action like you did with Almogic.
My script to compile firmware has only one file: rebuild
add: dtb-rockchip-xxx.tar.gz
My script to compile firmware has only one file: rebuild
So all the snippet code you mentioned about should be updated to your rebuild script, right?
Yes, add judgment in the corresponding place to deal with this special SOC: rk3328
Yes, add judgment in the corresponding place to deal with this special SOC: rk3328
I will try to judge the difference then report you the result. Hope you will support to build it successfully.
@ophub I tried to build Rk3328 again yesterday and got success overall but some detail error. Can you help me to check how to fix the detail error?
(1.1) Start building Armbian [ rk3328 - 5.15.34 ]. Remaining space is 29G. [ rk3328 - 5.15.34 ] (1/6) Confirm version type. [ rk3328 - 5.15.34 ] (2/6) Extract old armbian files. [ rk3328 - 5.15.34 ] (3/6) Refactor related files. tar: /home/runner/work/amlogic-s9xxx-armbian/amlogic-s9xxx-armbian/tmp_dir/tmp_build/bootfs/dtb/rockchip: Cannot open: No such file or directory
Detail log build: https://github.com/dinhchinh82/amlogic-s9xxx-armbian/runs/6078974259?check_suite_focus=true
Detail rebuild script: https://github.com/dinhchinh82/amlogic-s9xxx-armbian/blob/3328/rebuild
Thank you.
create without directory: mkdir -p dtb/rockchip
I see you copy his code directly, the parameter variables are not modified, this is unusable, you need to modify it according to the situation
@ophub As I think most of your script are enough to build Armbian Rk3328 with some modification any may not need any script from Flippy.
As this photo, there is a command to create the rockchip dtb folder
build_dtb=$(ls ${kernel_path}/${kernel}/dtb-rockchip-${kernel}-*.tar.gz 2>/dev/null | head -n 1)
tar -xzf ${build_dtb} -C ${tag_bootfs}/dtb/rockchip && sync
@ophub I have another idea to make the RK3328 image manually first as below:
Step 1: build Armbian for S905X3 as usual
Step 2: plug TF card to the computer, create armbianEnv.txt file as you mentioned in the /boot partition.
Step 3: extract the rockchip dtb from dtb-rockchip-5.4.188-flippy-71+o.tar.gz the copy to /dtb/rockchip folder and update armbianEnv.txt file.
how do you think about this solution?
Beside the armbianEnv.txt and dtb file, is there any other difference between S905x and RK3328 armbian?
thank you.
@ophub I can build RK3328 successfully as below then flash to the USB/TF but unable to boot the Armbian.
Build log: https://github.com/dinhchinh82/amlogic-s9xxx-armbian/runs/6091215912?check_suite_focus=true
Updated rebuild script: https://github.com/dinhchinh82/amlogic-s9xxx-armbian/blob/3328/rebuild
I read flippy's script, and I probably found the 4 differences that you posted above. You can look for others. Do you have this kind of equipment?
I read flippy's script, and I probably found the 4 differences that you posted above. You can look for others. Do you have this kind of equipment?
I have T9 (RK3318 4+32G) https://www.youtube.com/watch?v=9OXfDRxIbvQ
I've ever tried the RK3318/Rk3328 firmware from jock and it boot successfully. https://forum.armbian.com/topic/17597-csc-armbian-for-rk3318rk3328-tv-box-boards/
by the way, the firmware from Jock is not stable, some time the box shutdown suddenly without any reason. That's reason I want to try Flippy firmware on this box.
I read flippy's script, and I probably found the 4 differences that you posted above. You can look for others. Do you have this kind of equipment?
I don't use the flippy's script, only change some parts of your script related to dtb file, armbianEnv.txt file.
I don't know whether other generated firmware files are different between RK3328 & S905x or not?
Remove uEnv.ext when using armbianEnv.txt Delete amlogic when using rockchip under /boot/dtb Add soc judgment
If you have a device to test, first manually modify the local file, the test can be used, and then modify the compilation script to achieve the same purpose as manual modification.
Remove uEnv.ext when using armbianEnv.txt Delete amlogic when using rockchip under /boot/dtb Add soc judgment
@ophub I already deleted these files but still unable to boot. Still going to Android UI.
If you have a device to test, first manually modify the local file, the test can be used, and then modify the compilation script to achieve the same purpose as manual modification
That's what I want to do first. I want to judge the local file manually to make sure it works before update the compilation script.
Here are steps I update the local files manually for RK3328:
Step 1: Burn the [Armbian_22.05.0_Aml_s905x3_bullseye_5.4.188_2022.04.17.0035.img.gz] to TF card
Step 2: Plug the TF card to computer.
Step 3: Create armbianEnv.txt file under the Boot partition as the content below (I use ext4):
verbosity=7 overlay_prefix=rockchip rootdev=UUID=0a6174af-7ccd-41b9-a6f5-0ee1e9e4ee70 rootfstype=ext4 rootflags=compress=zstd:6 extraargs=usbcore.autosuspend=-1 extraboardargs= fdtfile=/dtb/rockchip/rk3328-box.dtb
Step 4: Delete /dtb/amlogic folder
Step 5: Delete uEnv.txt file
Step 6: Boot the T9 box (RK3318 4+32G) from TF card but unable to boot to Armbian. I also tried both reset method using pushing AV port and adb shell remote update.
3328 and 3318 are used the same? Here is the OpenWrt file of 3328. You can try to change the dtb of armbianEnv.txt and see if it can be started. If OpenWrt can be started, and then debug armbian, they are basically the same.
https://github.com/ophub/flippy-openwrt-actions/releases/tag/openwrt_s9xxx_2022.04.21.0913
3328 and 3318 are used the same?
As I know 3318 is similar to 3328 but cheaper. I've ever flashed RK3318 CSC firmware from Jock to both RK3328 and RK3318 box and they work.
Here is the OpenWrt file of 3328. You can try to change the dtb of armbianEnv.txt and see if it can be started.
I tried to flash your OpenWrt to TF card but later on, there is no way to edit dtb because there is no Boot partition to open like S905x armbian.
I plug the TF card with your OpenWrt to the T9 3318 box but got the error while booting as below:
As the guide from Jock, the dtb for 3328/3318 box is rk3328-box.dtb.
https://forum.armbian.com/topic/17597-csc-armbian-for-rk3318rk3328-tv-box-boards/
This OpenWrt is packaged using flippy's script. If it can't be started, it's not easy to test armbian. I don't have such a device, so I can only see the difference from his script.
链接:https://pan.baidu.com/s/1kbvtyxpcmniLKN_ziH-kqQ 提取码:jla9 try his armbian
@ophub can you check the manual step to make Armbian for 3318 as this linke? https://github.com/ophub/amlogic-s9xxx-armbian/issues/242#issuecomment-1104644994
I don't have the equipment, I don't know
I don't have the equipment, I don't know
Okay, I will try by myself to test if it work.
链接:https://pan.baidu.com/s/1kbvtyxpcmniLKN_ziH-kqQ 提取码:jla9 I don't have baidu account so there is no way to download.
Thank you very much for your support.
OpenWrt is completely packaged with his script, you can't start it after testing. If his rk3381's armbian can't start, just give up. There is no correct reference script, I don't know how to set it up. If his system can be activated, he can do so.
I don't have the equipment, I don't know
Okay, I will try by myself to test if it work.
链接:https://pan.baidu.com/s/1kbvtyxpcmniLKN_ziH-kqQ 提取码:jla9 I don't have baidu account so there is no way to download.
Thank you very much for your support.
Register for a free account and download
https://github.com/ophub/kernel/releases/tag/tools
Armbian_20.10_Beikeyun_buster_5.4.108-flippy-56+o.img.xz
https://github.com/ophub/kernel/releases/tag/tools
Armbian_20.10_Beikeyun_buster_5.4.108-flippy-56+o.img.xz
I don' see any images from the link above.
Register for a free account and download
I tried to register an account but quite difficult. Registered successfully but unable to login to download for users outside China.
I uploaded it last night, I thought you had already downloaded it, I deleted it this morning and uploaded it for you just now
I uploaded it last night, I thought you had already downloaded it, I deleted it this morning and uploaded it for you just now
@ophub Sorry I was busy today so I have not checked your reply.
Could you upload again by tomorrow (Saturday) and keep it about 2 hours from 9AM~11AM (Shanghai time, GMT+8)?
Thank you.
@ophub I can download file Armbian_20.10_Beikeyun_buster_5.4.108-flippy-56+o.img.xz from your link. It's fine to delete it to save your space now. Thank you.
@ophub I've tested the Armbian_20.10_Beikeyun_buster_5.4.108-flippy-56+o.img.xz file but it got same error white booting as the previous build you send some days before:
Please note that after flashing to the TF card, there is unable to open the /boot partition to change the configuration on armbianEnv.txt as you mentioned before.
I don't have such equipment and am not familiar with how they should be set up. Search for relevant tutorials and test yourself.
@ophub I can see there are kernel/u-boot for RK3328 from https://github.com/unifreq/openwrt_packit/tree/master/files/rk3328.
So is it able to build Armbian firmware for RK3318/3328 which uses the latest kernel from unifreq like you made for S9xxx? Thank you.