Linkstar-H-series / Openwrt

Other
12 stars 6 forks source link

image built from master branch doesn't boot #2

Open thosmos opened 1 year ago

thosmos commented 1 year ago

Describe the bug

I did a build from the master branch with only the minimal config necessary to select for the device type:

[thomas@althea openwrt]$ ./scripts/diffconfig.sh 
CONFIG_TARGET_rockchip=y
CONFIG_TARGET_rockchip_armv8=y
CONFIG_TARGET_rockchip_armv8_DEVICE_linkstar_opc-h68k=y

The image built fine, but when booting it from a TF card, there is no sign of life.

OpenWrt version

8ad4fbf6c706c56c1d27c4b21f11575f42f36c8e

OpenWrt target/subtarget

CONFIG_TARGET_rockchip_armv8_DEVICE_linkstar_opc-h68k

Device

linkstar h68k

Image kind

Self-built image

Steps to reproduce

git pull
git checkout master
make dirclean
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
make
gunzip -k bin/targets/rockchip/armv8/openwrt-rockchip-armv8-linkstar_opc-h68k-squashfs-sysupgrade.img.gz
sudo dd if=bin/targets/rockchip/armv8/openwrt-rockchip-armv8-linkstar_opc-h68k-squashfs-sysupgrade.img of=/dev/mmcblk0 bs=1M

Actual behaviour

when powered on with the TF card inserted, only the white power button turns white. There are no other activity lights.

Expected behaviour

Expected behavior would be to behave similar to other openwrt images which include status LED blinking and eth port status leds.

Additional info

No response

Diffconfig

CONFIG_TARGET_rockchip=y
CONFIG_TARGET_rockchip_armv8=y
CONFIG_TARGET_rockchip_armv8_DEVICE_linkstar_opc-h68k=y

Terms

hoyoho commented 1 year ago

you could try to use Balena Etcher instead of dd

thosmos commented 1 year ago

you could try to use Balena Etcher instead of dd

Are you able to build and run a working image from this repo? dd works fine for their provided image and for other openwrt images that I build. It's only the one built from this repo that fails. How does one access the serial console for this device? I opened it but there's no obvious serial port.

hoyoho commented 1 year ago

No, I didn't build it. But I have met a similar problem with their build for Chinese version. The firmware URL is here. I don't know how to use serial consol neither.

hsakoh commented 1 year ago

I am getting the same problem .

I am using Rufus to write to the TF card.

The officially provided image (openwrt-rockchip-R22.11.18_opc-h68k-d-squashfs-sysupgrade.img) boots from the TF card. But, the self-built image (master branch of this repository) will not boot on the TF card. (In that case, the image already written to eMMC will boot.)

Both images will boot correctly when flashed to eMMC.

dk4dk4 commented 1 year ago

Same issue here, does not boot from TF card (Balena Etcher) when built from this repository. Have not tried eMMC yet.

thosmos commented 1 year ago

Is there a way to flash it to eMMC from Linux? They only provide instructions for doing it from Windows.

On Wed, Mar 22, 2023 at 7:37 PM dk4dk4 @.***> wrote:

Same issue here, does not boot from TF card when built from this repository. Have not tried eMMC yet.

— Reply to this email directly, view it on GitHub https://github.com/Linkstar-H-series/Openwrt/issues/2#issuecomment-1480507306, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEXVZXL4FYKCAWIOEELQI3W5OZO3ANCNFSM6AAAAAAVGMNH5E . You are receiving this because you authored the thread.Message ID: @.***>

hsakoh commented 1 year ago

@thosmos I have not tried it, After booting from the TF card, it seems I can connect via SSH and flash to /dev/mmcblk0 with DD.

https://forum.seeedstudio.com/t/linkstar-h68k-0232-router-firmware-updates/268042/36

coolsnowwolf commented 1 year ago

Refer to rockchip official document [1], there are two types of loader program: 1) U-Boot TPL/SPL (i.e. upsream U-Boot, also called mainline U-Boot) 2) Rockchip MiniLoader

This opensource GPL kernel using the upsream U-Boot.

If you want to boot from the TF card, you may need clear the Loader on the eMMC first

The clearing method is as follows, after starting from the eMMC, enter the following command on the command line to clear the Loader on the eMMC:

dd if=/dev/zero of=/dev/mmcblk2 bs=8M count=1

The alt way is flashing this raw image to emmc using RKDevTool_Release as below : ( extract the sys image from gz)

image RKDevTool_Release_v2.84.zip

hsakoh commented 1 year ago

@coolsnowwolf

I would like to know a few things I don't understand.

First point. Is the MiniLodarAll.bin in that screenshot the same as H68K-Boot-Loader_20220922_180313.bin?

Second point.

If you want to boot from the TF card, you may need to clear the Loader on the eMMC first

Does this mean the same as Step.3 in here?

Third point. A. Officially distributed image openwrt-rockchip-R22.11.18_opc-h68k-d-squashfs-sysupgrade.img B. Build myself the image openwrt-rockchip-armv8-linkstar_opc-h68k-squashfs-sysupgrade.img from this repository.

After flashing A or B to eMMC, both images could be boots from eMMC.

With A or B flashed to eMMC, When A is written to the TF card, it boot from the TF card. When B is written to the TF card, it does not boot from the TF card. What is the cause of this difference?

hsakoh commented 1 year ago

I was a little confused. It seems that the combination of the image on the eMMC and the image on the TF card behaves differently.

The following table summarizes the three image combinations and the results.

TF(none) TF-ImageA TF-ImageB TF-ImageC
eMMC-ImageA boot A boot A noboot(MaskMode?) noboot(MaskMode?)
eMMC-ImageB boot B boot A boot B(eMMC) boot C
eMMC-ImageC boot C boot A boot C(eMMC) boot C

ImageA=Official Image https://sourceforge.net/projects/linkstar-h68k-os/files/Openwrt/ ImageB=this repository default ImageC=this repository dtsi modified

Image C has removed the following line in reference to this commit https://github.com/Linkstar-H-series/Openwrt/blob/8ad4fbf6c706c56c1d27c4b21f11575f42f36c8e/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-linkstar-opc.dtsi#L594

oelegeirnaert commented 1 year ago

Same, i cannot boot the SD Card. Another option is to flash to eMMC, but i don't know how to do it via Linux. Only Windows is documented