Jump to content

How to install armbian in h618?


alienxz77b

Recommended Posts

1 hour ago, Nick A said:

Yes! That is what I was looking at right now. Thanks iun cuim. I was stuck on the 100mbps ethernet. But it seems Warpme got it working. So I'm going to focus on his patches and see if I can get Transpeed working on Armbian. I got this TV Box a month ago and I didn't know Warpme already did most of the hard work. 

 

Yes, absolutely, it has been a great source of information.. make sure you leave the credit on any patches you bring over.

The list here is great, and this is where I plan to pull over the h61x sound patches from for testing

https://github.com/warpme/minimyth2/tree/master/script/kernel/linux-6.6/files

Edited by pixdrift
Link to comment
Share on other sites

@Nick A Just an update from our chat the other day. Finally got some time to get the LCD monitor out and test it. HDMI works! As expected, WiFi for the AllWinner AW869A is non-existent. Thankfully I have a little USB WiFi dongle that always works, so after some deb packages copied over from another machine, I was able to get the TX68 on the network. From there, I installed the Gnome desktop and I sit authoring this post on the TX68! Whoo Hoo! Next steps, examine the eMMC partition for firmware blobs or anything remotely useful to get the AW869A fired up. I also notice that graphics rendering is CPU based, so that's also on my hit list.

Machine About.png

Link to comment
Share on other sites

Hi guys,

I downloaded the image flashed it onto a sd-card. Opened it and added the two required files with appropriate file names.

Stuck into my 8k618-t tried the toothpick method to get it to boot from the sd card but no joy. 

Can you guys tell me what I am missing?

thanks Heiko

Link to comment
Share on other sites

First update.

I managed to flash armbian onto the 8K618-T with the built from @pixdriftand the bin and txt file from @Nick A. I used the built with Desktop.

I first tried to get it to boot from the SD-card with the Toothpick method but that was not necessary. I just booted into Android, went into settings and let it search for an Update. Worked flawlessly.

after that it rebooted into the armbian-config.

I was able to connect to my wifi. 5.0 and 2.4 work flawlessly.

I then created user account etc...

booted into the desktop and played with a bit. 

I am now installing Klipper the Software that controls 3D printers and I already managed to clone a git onto the machine. 
Everything looks great.

I don't know what to say.

 

You guys rock. 🪨👍3

 

 

@Nick A and @pixdrift great work.

you need to put that all onto Github with a nice Wiki to tell people exactly how to get it flashed on this little inexpensive machine.

I have the 4GB ram + 128GB EMMC version. This is very good for my purposes and it only cost me $28 with shipping.

This thing is great.

 

 

 

 

 

 

Edited by heiko910
Link to comment
Share on other sites

I was mistaken. It booted from SD-card but didn't flash anything on to the device at all. 

When rebooted it just went back into android. 

What do I need to do to get this to get flashed onto the device?

Thanks

Link to comment
Share on other sites

I just want ot keep you posted.

I managed again to from sd card into armbian. Everything seems to work as advertised. 

Then I ran the armbian-install script to install armbian onto the emmc.

Initially it looked like it was succesful but after shutting down, removing the sd card and powering back up it would not boot from emmc.

I can still boot from SD-card but unfortunatly not from the internal storage.

Does anyone have any idea how to fix that?

thanks

Link to comment
Share on other sites

Hey guys,

I have been fiddling with this for days now.

I think I have to give up.

 

I am able to boot from an sd-card that has the built on it that @pixdrift whipped up the other day.

It boot flawlessly. 

In the terminal is was able to start armbian-install and move the content of the sd over to the internal emmc. That finished without errors.

i then went ahead and opened the armbian-config from the emmc and modified the boot environment to make sure it has the correct boot drive UUID. 

Everything look good but I will still not boot from EMMC.

 

Any help with this would be appreciated.

 

 

BTW everything in this built seems to be working as long as I boot from SD-Card. Ethernet, Wifi all the USB port ... everything works great except the part with moving it to emmc.

 

Link to comment
Share on other sites

5 hours ago, heiko910 said:

i then went ahead and opened the armbian-config from the emmc and modified the boot environment to make sure it has the correct boot drive UUID. 

 

Sorry but I am confused about this part. Why did you had to modify the UUID yourself?

 

Armbian install has the option to install bootloader to emmc. Not sure if you used it, but if not try using the same.

 

It generally helps to see the serial console logs when troubleshooting boot issues, so if you can share them that will make it easier for people to help you out.

Link to comment
Share on other sites

@Gunjan Gupta I only used the Armbian-Config to see what the Boot Environment was set to and to see if the correct boot device was set by Armbina-Install.

It turned out that Armbian-Install had set the UUID of the SD-Card as the boot device.

I will try to add a UART Serial port to the board and see what I can come up with.

 

Link to comment
Share on other sites

It sounds to me as if you may have used armbian-config to copy the root filesystem to emmc, but didn't copy the boot environment over.  So you may have had a working environment with boot from SD, but everything else on emmc.  Then when you forced the change of the boot uuid, you now have a broken system as there may not be a boot environment installed on emmc.  But since I don't know the exact options you used in armbian-config this is only a guess.

 

Link to comment
Share on other sites

so, here is the output of the serial connection when I boot from SD-card, and as I mentioned before that works flawlessly:


U-Boot SPL 2024.01-rc5-armbian (Jan 31 2024 - 05:51:55 +0000)
DRAM: 4096 MiB
Trying to boot from MMC1
NOTICE:  BL31: v2.10.0  (debug):armbian
NOTICE:  BL31: Built : 05:51:51, Jan 31 2024
NOTICE:  BL31: Detected Allwinner H616 SoC (1823)
NOTICE:  BL31: Found U-Boot DTB at 0x4a09c138, model: Transpeed 8K618-T
INFO:    ARM GICv2 driver initialized
INFO:    Configuring SPC Controller
INFO:    PMIC: Probing AXP305 on RSB
ERROR:   RSB: set run-time address: 0x10003
INFO:    Could not init RSB: -65539
INFO:    BL31: Platform setup done
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a53: CPU workaround for erratum 855873 was applied
INFO:    BL31: cortex_a53: CPU workaround for erratum 1530924 was applied
INFO:    PSCI: Suspend is unavailable
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x4a000000
INFO:    SPSR = 0x3c9
INFO:    Changed devicetree.
ns16550_serial serial@5000000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19


U-Boot 2024.01-rc5-armbian (Jan 31 2024 - 05:51:55 +0000) Allwinner Technology

CPU:   Allwinner H616 (SUN50I)
Model: Transpeed 8K618-T
DRAM:  4 GiB
Core:  58 devices, 21 uclasses, devicetree: separate
WDT:   Not starting watchdog@30090a0
MMC:   mmc@4020000: 0, mmc@4022000: 1
Loading Environment from FAT... Unable to use mmc 0:1...
In:    serial@5000000
Out:   serial@5000000
Err:   serial@5000000
Net:   No ethernet found.
starting USB...
Bus usb@5101000: sun4i_usb_phy phy@5100400: External vbus detected, not enabling our own vbus
USB EHCI 1.00
Bus usb@5101400: USB OHCI 1.0
Bus usb@5200000: USB EHCI 1.00
Bus usb@5200400: USB OHCI 1.0
scanning bus usb@5101000 for devices... 1 USB Device(s) found
scanning bus usb@5101400 for devices... 1 USB Device(s) found
scanning bus usb@5200000 for devices... 1 USB Device(s) found
scanning bus usb@5200400 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Autoboot in 1 seconds, press <Space> to stop
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
3259 bytes read in 5 ms (635.7 KiB/s)
## Executing script at 4fc00000
U-boot loaded from SD
Boot script loaded from mmc
204 bytes read in 5 ms (39.1 KiB/s)
33888 bytes read in 14 ms (2.3 MiB/s)
Working FDT set to 4fa00000
4203 bytes read in 12 ms (341.8 KiB/s)
Applying kernel provided DT fixup script (sun50i-h616-fixup.scr)
## Executing script at 45000000
18402708 bytes read in 769 ms (22.8 MiB/s)
23169032 bytes read in 967 ms (22.8 MiB/s)
Moving Image from 0x40080000 to 0x40200000, end=41890000
## Loading init Ramdisk from Legacy Image at 4ff00000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    18402644 Bytes = 17.6 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 4fa00000
   Booting using the fdt blob at 0x4fa00000
Working FDT set to 4fa00000
   Loading Ramdisk to 48e73000, end 49fffd54 ... OK
   Loading Device Tree to 0000000048e02000, end 0000000048e72fff ... OK
Working FDT set to 48e02000

Starting kernel ...


Armbian-unofficial 24.2.0-trunk Bookworm ttyS0
 

Link to comment
Share on other sites

1 hour ago, heiko910 said:

It turned out that Armbian-Install had set the UUID of the SD-Card as the boot device.

 

Can't say for sure, but I guess you used armbian-install to install root to emmc. Then while still running from sdcard, you tried to check the UUID, which will give the uuid present in sdcard's /boot/armbianEnv.txt file and hence you got the UUID of sdcard. So my guess is when you updated the UUID, you actually ended up changing that on your sdcard too. When sdcard will be removed, the emmc never would have bootloader installed and hence will fail to boot. But with sdcard inserted you will be able to use emmc as root device.

 

Again this is all speculation. Best option to tell will be if you can share screenshot of armbian-install's first screen highlighting which option you choose to install to emmc.

Link to comment
Share on other sites

Here is the UART output when trying to boot from EMMC:


U-Boot SPL 2024.01-rc5-armbian (Jan 31 2024 - 05:51:55 +0000)
DRAM: 4096 MiB
Trying to boot from MMC2
mmc_load_image_raw_sector: mmc block read error
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

Link to comment
Share on other sites

Ok...Too long of a video, mostly skipped through the same and didn't watched till the end.

 

I think you need to add CONFIG_MMC_SUNXI_SLOT_EXTRA=2 in your devices uboot config. You can either do that by adding a patch for your uboot defconfig file or by using post_config_uboot_target hook in your board config file. For the latter see - config/boards/cubieboard2.csc for example

Link to comment
Share on other sites

yeah noticed that in Nick's repository. The commit says its 5 days old. so not sure if thats included or not. But anyways. it possibly can be that issue that you have shared. Anyway until someone fixes that, I guess you can continue using the sdcard.

Link to comment
Share on other sites

Banana Pi M4 berry and M4 zero are H618 devices that comes with emmc. So I guess it might be possible this patch might solve issue for you as well - https://github.com/BPI-SINOVOIP/pi-u-boot/commit/cbdca15b14fa677df322d9754f30a8da662c10c4

 

This is just a speculation however. I don't have any of the three devices to reproduce the issue or to confirm if it resolves the same.

Link to comment
Share on other sites

Hey @Nick A,

I tried your newest Image.

Things have changed a bit but It is still not booting all the way into the desktop but with my UART we are getting somewhere now. Here is the output!

BTW I have ethernet connected when this happens


 

U-Boot SPL 2024.01-armbian (Feb 08 2024 - 23:32:11 -0500)
DRAM: 4096 MiB
Trying to boot from MMC2
H616: init mmc 2 clock(8000000) and io
NOTICE:  BL31: v2.10.0  (debug):armbian
NOTICE:  BL31: Built : 23:30:40, Feb  8 2024
NOTICE:  BL31: Detected Allwinner H616 SoC (1823)
NOTICE:  BL31: Found U-Boot DTB at 0x4a09c188, model: Transpeed 8K618-T
INFO:    ARM GICv2 driver initialized
INFO:    Configuring SPC Controller
INFO:    PMIC: Probing AXP305 on RSB
ERROR:   RSB: set run-time address: 0x10003
INFO:    Could not init RSB: -65539
INFO:    BL31: Platform setup done
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a53: CPU workaround for erratum 855873 was applied
INFO:    BL31: cortex_a53: CPU workaround for erratum 1530924 was applied
INFO:    PSCI: Suspend is unavailable
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x4a000000
INFO:    SPSR = 0x3c9
INFO:    Changed devicetree.
ns16550_serial serial@5000000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19


U-Boot 2024.01-armbian (Feb 08 2024 - 23:32:11 -0500) Allwinner Technology

CPU:   Allwinner H616 (SUN50I)
Model: Transpeed 8K618-T
DRAM:  4 GiB
Core:  58 devices, 21 uclasses, devicetree: separate
WDT:   Not starting watchdog@30090a0
MMC:   H616: init mmc 2 clock(8000000) and io
mmc@4020000: 0, mmc@4022000: 1
Loading Environment from FAT... Unable to use mmc 1:1...
In:    serial@5000000
Out:   serial@5000000
Err:   serial@5000000
Net:   No ethernet found.
starting USB...
Bus usb@5101000: sun4i_usb_phy phy@5100400: External vbus detected, not enabling our own vbus
USB EHCI 1.00
Bus usb@5101400: USB OHCI 1.0
Bus usb@5200000: USB EHCI 1.00
Bus usb@5200400: USB OHCI 1.0
scanning bus usb@5101000 for devices... 1 USB Device(s) found
scanning bus usb@5101400 for devices... 2 USB Device(s) found
scanning bus usb@5200000 for devices... 1 USB Device(s) found
scanning bus usb@5200400 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Autoboot in 1 seconds, press <Space> to stop
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
Found U-Boot script /boot/boot.scr
 ** fs_devread read error - block
Failed to load '/boot/boot.scr'
## Executing script at 4fc00000
Bad data crc
SCRIPT FAILED: continuing...
MMC: no card present
No EFI system partition
No EFI system partition
Failed to persist EFI variables
BootOrder not defined
EFI boot manager: Cannot load any image
MMC: no card present

Device 0: unknown device
No ethernet found.
missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
Retrieving file: pxelinux.cfg/000000
No ethernet found.
Retrieving file: pxelinux.cfg/00000
No ethernet found.
Retrieving file: pxelinux.cfg/0000
No ethernet found.
Retrieving file: pxelinux.cfg/000
No ethernet found.
Retrieving file: pxelinux.cfg/00
No ethernet found.
Retrieving file: pxelinux.cfg/0
No ethernet found.
Retrieving file: pxelinux.cfg/default-arm-sunxi-sunxi
No ethernet found.
Retrieving file: pxelinux.cfg/default-arm-sunxi
No ethernet found.
Retrieving file: pxelinux.cfg/default-arm
No ethernet found.
Retrieving file: pxelinux.cfg/default
No ethernet found.
Config file not found
No ethernet found.
No ethernet found.


Thanks @Nick A

 

 

Link to comment
Share on other sites

@nitrolackThanks for sharing the pictures.

I have been messing with a similar board for a while. @Nick A and @pixdrifthad whipped up a build for me that runs fine from a sd card, I just haven't been able to successfully install that build on the internal storage. I have a couple of the Innovato quadra SBC that run Armbian just fine, they are just a bit limited in their specs 1GB Ram and 16gb Rom. I was hoping to one day be able to install Armbian on one of those inexpensive Tv boxes but so far no joy.

My board look very similar has 4gb RAm and 128GB EMMC storage.

Here are some pictures

IMG20240224151106.jpg

IMG20240224151118.jpg

Link to comment
Share on other sites

@heiko910 ty also for posting pictures, so it's easier to clarify stuff. What seems interesting by your board is, that you have uart connectors. Could not determine them on my board yet. I was also thinking about saving the firmware of it first before doing anything. Read that you could do it directly from armbian. 

Link to comment
Share on other sites

Well, after taking a break with fighting with this board for a couple months, I just tried to catch up.

You may recall I have this board:

image.png

 

I downloaded the server image from https://armdev.pixeldrift.net/transpeed/8k618-t, wrote it to a uSD, added the brcmfmac4335 drivers as described previously.

 

For some reason I could not get the serial console running at 1,500,000 bps. Garbled - probably a baud rate mismatch?  This worked for me a few months back.

Oh well, a text session was usable on hdmi and keyboard, so I continued there.  Neither ethernet or wifi was working.

- The kernel finds dwmac-sun8i, but it fails to initialize  "dwmac-sun8i 5030000.ethernet eth0: stmmac_dvr_remove: removing driver"

  Debugging beyond this is way over my head.

- On wifi, the kernel was erroring out looking for brcmfmac4334-sdio driver files.  I thought this board used brcmfmac4335??

  I found what I believe are the correct 4334 *.bin, *.txt, and *.clm_blob files, and placed them in /lib/firmware/brcm - based on kernel error messages.

  But still No Go.  I do not see any error messages in the kernel log, but no network device is created. Another dead end for my ability.

 

I tried plugging in a cheap USB to ethernet dongle I had lying around, and IT WORKS!   "usbcore: registered new interface driver cdc_ether"

It is slow, attached to a USB-2 link (480mbit/sec) but OK for light work. (The switch port says it's attached at 1Gbit - yea sure!)

 

Thanks to Nick A, apritzel, pixdrift & probably others for their work getting this far - alot more stuff is working now than last time I looked, and with the enet dongle,

I can actually start playing with the system.

 

I ran out of time today to further explore https://github.com/warpme/miniarch.

I did NOT try to install & boot from emmc, although I see the device at mmcblk2.

 

BTW, that is my serial console attached with the loose wires above. The pins are actually labelled GND TX RX on my board. Different from nicrolack's board.

 

 

Edited by rick0cm
Link to comment
Share on other sites

Hi Rick0cm

Looking at your board again I can see you have a different Wifi chip then mine.

 

Try Miniarch with the Vontar Box image. It's very similar to the Transpeed box but it has the same Wifi chip as yours. https://github.com/warpme/miniarch/releases/download/v20240209/MiniArch-20231112-6.7.4-board-h618.vontar_h618-SD-Image.img.xz . Follow the install guide here. https://github.com/warpme/miniarch?tab=readme-ov-file

 

For serial console I use gtkterm in linux.

sudo gtkterm -p /dev/ttyUSB0 -s 115200

Edited by Nick A
Link to comment
Share on other sites

Thanks for the tips Nick.  I'll look at the Miniarch.

Soooo many slightly different boards.

 

Ahh, maybe I was hung up on the 1.5M baud uart - I've been playing with several Rockchip boards recently that need 1.5M.

My goto serial is tio on Linux. 

Link to comment
Share on other sites

First clone my build. 

git clone https://github.com/NickAlilovic/build.git
 

Patches are located in the "build/patch/kernel/archive/sunxi-6.7/patches.armbian/" directory.

 

If you are adding new patches you need to include them in these two files "build/patch/kernel/archive/sunxi-6.7/series.armbian" and "build/patch/kernel/archive/sunxi-6.7/series.conf".

 

Compile a transpeed image.

./compile.sh

 

In the choose board menu click on "Show CSC/WIP/EOS/TVB" option then choose "transpeed-8k618-t".  Choose "bleeding edge", "bookworm", server or desktop doesn't matter. Any desktop environment. Any software. 

 

Your image should be in the output directory when it's done compiling. You can see if the patches have been applied properly in the "/build/output/logs" directory.

 

(Note next step is for more advanced users.)

 

If you want to create your own patch. You can find the patched kernel source code in "build/cache/sources/linux-kernel-worktree/6.7__sunxi64__arm64" directory. Go into your kernel source directory and execute these commands.

 

sudo git add .

sudo git commit --signoff

 

Now you are ready to edit the patched kernel and add your own code. After you are done editing the source code execute these commands.

 

sudo git status

sudo git add path/to/the/file/you/just/edited

sudo git commit --signoff

sudo git format-patch linux-6.7.y

 

You should see your new patches created in the kernel source directory. Move them to "build/patch/kernel/archive/sunxi-6.7/patches.armbian/" directory. Edit the files "build/patch/kernel/archive/sunxi-6.7/series.armbian" and "build/patch/kernel/archive/sunxi-6.7/series.conf" to include your new patches. 

 

U-boot patches are in "build/patch/u-boot/u-boot-sunxi" directory. No need to edit conf files to apply them. You can find the patched source code in "build/cache/sources/u-boot-worktree/u-boot/v2024.01" directory.

 

sudo git add .

sudo git commit --signoff

 

Edit the source code.

 

sudo git status

sudo git add path/to/the/file/you/just/edited

sudo git commit --signoff

sudo git format-patch v2024.01

 

When your patch is created move them to "build/patch/u-boot/u-boot-sunxi".

 

Edited by Nick A
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines