Jump to content

jock

Members
  • Posts

    1845
  • Joined

  • Last visited

Reputation Activity

  1. Like
    jock got a reaction from royk in Pulseaudio and "Built-in Audio" issue (involves ALSA)   
    Some people noticed that Pulseaudio mixes is showing "Built-in Audio" for all the audio devices of the SBCs.
    I investigated and found that the issue is related to ALSA: the devices are not really exposed by their real hardware connection (HDMI, SPDIF, ...) but just as "hw" devices. Pulseaudio is interpreting this as built-in audio because does not know anything else of the device.
     
    I'm no ALSA expert at all, copied some already existing configuration files without really understanding what I did, I found a solution.
     
    To solve the problem with SPDIF and HDMI you need to place the following two configuration files in /usr/share/alsa/card. Call the first one SPDIF-OUT.conf and the second one HDMI-OUT.conf
     
    # configuration for SPDIF connections which just expose the # audio out device <confdir:pcm/iec958.conf> SPDIF-OUT.pcm.iec958.0 { @args [ CARD AES0 AES1 AES2 AES3 ] @args.CARD { type string } @args.AES0 { type integer } @args.AES1 { type integer } @args.AES2 { type integer } @args.AES3 { type integer } type hw card $CARD } # configuration for HDMI connection which just expose the # audio out device <confdir:pcm/hdmi.conf> HDMI-OUT.pcm.hdmi.0 { @args [ CARD DEVICE CTLINDEX AES0 AES1 AES2 AES3 ] @args.CARD { type string } @args.DEVICE { type integer } @args.CTLINDEX { type integer } @args.AES0 { type integer } @args.AES1 { type integer } @args.AES2 { type integer } @args.AES3 { type integer } type hw card $CARD } Then discover your audio device names:
    $ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: SPDIF [SPDIF], device 0: ff8b0000.sound-dit-hifi dit-hifi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: DWI2SHDMI [DW-I2S-HDMI], device 0: ff890000.i2s-i2s-hifi i2s-hifi-0 [] Subdevices: 0/1 Subdevice #0: subdevice #0 Mine are "SPDIF" and "DW-I2S-HDMI" - these two strings come from the device tree so each board may have their own peculiar device names.
     
    And finally edit the file /usr/share/alsa/conf/aliases.conf adding the cards to the list, to get something like this (I just added the SPDIF and DW-I2S-HDMI device at the bottom of the list to alias to the right cards):
    # # Define aliases for various drivers # YMF724 cards.YMF744 YMF724F cards.YMF744 YMF740 cards.YMF744 YMF740C cards.YMF744 YMF754 cards.YMF744 CMIPCI cards.CMI8338 CMI8738 cards.CMI8338 CMI8738-SWIEC cards.CMI8338-SWIEC CMI8738-MC4 cards.CMI8738-MC6 'E-mu APS' cards.EMU10K1 'GUS MAX' cards.GUS 'GUS ACE' cards.GUS 'GUS Extreme' cards.GUS 'AMD InterWave' cards.GUS 'Dynasonic 3-D' cards.GUS 'InterWave STB' cards.GUS au8810 cards.AU8810 au8820 cards.AU8820 au8830 cards.AU8830 Prodigy71 cards.Aureon71 Prodigy71LT cards.Aureon71 Prodigy71HIFI cards.Aureon71 Aureon71Univ cards.Aureon71 VIA82XX-MODEM cards.ICH-MODEM 'MPU-401 UART' cards.MPU-401 'VX222/Old' cards.VX222 'VX222/v2' cards.VX222 'VX222/Mic' cards.VX222 'CMI8330/C3D' cards.CMI8330 'SB AWE' cards.SBAWE 'SB Pro' cards.SBPro 'PMac Burgundy' cards.PMac 'PMac DACA' cards.PMac 'PMac Tumbler' cards.PMac 'PMac Snapper' cards.PMac 'PMac Screamer' cards.PMac 'PMac AWACS' cards.PMac 'PMac Toonie' cards.PMacToonie AppleOnbdAudio cards.PMacToonie 'USB US-X2Y' cards.US-X2Y 'Serial MIDI' cards.SerialMIDI 'Prodif Plus' cards.ProdifPlus ESM1 cards.ES1968 ES1978 cards.ES1968 Allegro cards.Maestro3 Canyon3D-2 cards.Maestro3 Azalia cards.HDA-Intel aaci-pl041 cards.AACI AV66 cards.CMI8788 AV100 cards.CMI8788 AV200 cards.CMI8788 CMI8786 cards.CMI8788 CMI8787 cards.CMI8788 SPDIF cards.SPDIF-OUT DW-I2S-HDMI cards.HDMI-OUT <confdir:pcm/default.conf> <confdir:pcm/dmix.conf> <confdir:pcm/dsnoop.conf>  
    Now running aplay -L you should see, among the other generic devices, spdif and HDMI devices with the proper device tag:
    $ aplay -L ... iec958:CARD=SPDIF,DEV=0 SPDIF, IEC958 (S/PDIF) Digital Audio Output ... hdmi:CARD=DWI2SHDMI,DEV=0 DW-I2S-HDMI, HDMI Audio Output ... Then reboot (or run pulseaudio -k from a shell as non-root user) and finally pulseaudio mixer should show this:

     
     
    I'm eager to understand what the hell I did, but also I would like to transform the thing in something that works directly from asound.conf instead of having cards configuration files in alsa directories, so any correction and explanation is very welcome
     
     
  2. Like
    jock got a reaction from Willy Moto in CSC Armbian for RK3318/RK3328 TV box boards   
    @Krotosz6 Good you discovered it by yourself
     
    current and edge are kernel flavours.
    Current is the stable one, which is older but expected to always work. At the moment the current kernel is 5.15.
    Edge kernels are experimental/development. They are newer (at the moment 5.19) but can break anytime because they are not guaranteed to work, since they are... experimental!
     
    I don't have anything against tutorials, they are welcome, but the problem with them is that they become obsolete. In fact the apt-mark step is not necessary anymore, since support for rk3318 is now part of mainline armbian.
    The best tutorial is described in the first page of this thread, plus it is always kept up to date.
    Also images are now compiled and signed by armbian servers too, not anymore by myself - full instructions are again in the first post.
     
  3. Like
    jock got a reaction from Willy Moto in CSC Armbian for RK3318/RK3328 TV box boards   
    @Krotosz6 Hello, indeed you're not seeing the internal memory: as long as the two pins are shorted, the clock of the internal flash is gated to ground: basically it does not receive any clock and that's the reason it is bypassed.
    You should short the two pins, turn the board on and then release the pins almost immediately.
     
    So far, even if the image installation has been interrupted, multitool should be able to boot anyway unless you wrote an image for another similar soc or you interrupted it so soon it was not able to write the bootloader.
     
    By the way, once armbian has booted, you should be able to see the internal flash as /dev/mmcblk2, thus blkdiscard /dev/mmcblk2 or dd if=/dev/zero of=/dev/mmcblk2 bs=1M count=32 oflag=direct should both be able to clean the existing bootloader on internal flash to let it boot again; otherwise you can use the multitool to do the same.
  4. Like
    jock got a reaction from Willy Moto in CSC Armbian for RK3318/RK3328 TV box boards   
    armbian does not boot from sdcard with Android bootloader.
    It will boot from sdcard once it is installed in emmc, so you can test other armbian images from sdcard without overwriting emmc.
  5. Like
    jock got a reaction from Willy Moto in CSC Armbian for RK3318/RK3328 TV box boards   
    LIRC comes after the kernel-based handler. You should investigate ir-keytable instead, that will change the kernel-level key bindings for the remote.
  6. Like
    jock reacted to speed21 in CSC Armbian for RK322x TV box boards   
    My board decided to crap its pants after flashing armbian for the 10th time but I managed to revive it.
     
    Not sure if this is useful but I found the clock pin that I can connect GND to make the box enter MASKROM mode my board has an emcp chip on it
    My model is MXQPRO_V71
    you can solder a wire to this point and short it to ground then plug in your sdcard with multitool
    short the clock pin to the ground and plug the power, wait till the led indicator turns red then remove the jumpers. if the led starts flashing then you are all set! you can try flashing armbian or your stock firmware to your box

  7. Like
    jock reacted to sum1saw in Unbrick Rockchip RK3288   
    Many Thanks @jock, can you please suggest/point me in right direction how can create a working android rom for RK3288
     
    Note For any Future Purpose,
    1. Short the emmc pin
    2. Used LINUX RKDEVELOPTOOL to clear the flash (if you have issue while installing RK Develop Tool Refer to this PR) => ./rkdeveloptool ef
    3. Used RKDEVTOOL to clear the flash again 
    4. Used LINUX UPGRADE TOOL to upload the working  u boot loader file ==> upgrade_tool ul ../RK3288Ubootxx.bin
    4. Used ANDROIDFLASHTOOL to install the Firmware once bootloader is working fine and device is in Loader Mode.

     
  8. Like
    jock got a reaction from sum1saw in Unbrick Rockchip RK3288   
    @sum1saw you're welcome, at least you have been able to restore the original firmware and the device is not bricked anymore
  9. Like
    jock got a reaction from MR01 in CSC Armbian for RK3318/RK3328 TV box boards   
    @MR01 that 5.19.15 version was an experimental version; I compiled it without the extra wifi drivers because they were causing compilation issues. If you need something "stable" you should stay stick with the community version available on github which is updated regularly and prefer the "current" kernel flavour in place of edge.
  10. Like
    jock got a reaction from MR01 in CSC Armbian for RK322x TV box boards   
    @MR01 It should work as usual, that part never changed and the boot priority is always sdcard -> USB -> eMMC. I don't remember if there were minor or major bugs in that part in the past. Perhaps you can try to upgrade the bootloader with apt update && apt install linux-u-boot-rk322x-box-current, but usually it is best to upgrade bootloader and kernel together, so I don't suggest to do that.
     
    You can also try to boot multitool from USB stick, but the best way to do experiments is to burn an armbian image onto sdcard or USB stick so you don't touch the installed system. Of course remember to decompress the image first, if your image writer does not so automatically.
  11. Like
    jock got a reaction from mwe in CSC Armbian for RK322x TV box boards   
    @mwe Perhaps you're trying to ping the wifi interface from another machine? Because the ssv6051 suffered a problem with the broadcast ARP packets that has been solved in the mainline flavour of the kernel, which does not work with NAND yet.
    In practice the driver does not respond to ARP packets, so the wifi interface does not "announce" itself to others when asked to. The presence of the ethernet may cause some side effects that let the interface announce deliberately and so it works.
  12. Like
    jock got a reaction from hartraft in MGLRU patches to bring down kswapd cpu usage   
    @hartraft Currently, I can assure you that the tinkerboard with armbian edge kernel (6.1) receives MGLRU compiled and enabled by default because I maintain the rk3288 (rockchip 32 bit) family.
    The other two boards are not under my maintenance so I can't say anything about, but you could check in the config sample file in your /boot directory to see if a kernel is compiled with the options pointed by @hexdump
  13. Like
    jock got a reaction from hartraft in MGLRU patches to bring down kswapd cpu usage   
    Finally! On my personal testing on 5.19.x never had any issue with both armhf and arm64 architectures
  14. Like
    jock got a reaction from Maker39 in CSC Armbian for RK322x TV box boards   
    @Maker39 it looks to me that you're running an "old" image: the kernel reports it has been compiled 21th Sep 2022, but the esp8089 driver and wifi fixes have been introduced the 3rd Oct 2022. Use a newer image or do apt update && apt upgrade.
     
    The emmc in those logs looks fine to me, it is detected correctly and I don't see any error.
    Upgrade and send again the URL from armbianmonitor -u
  15. Like
    jock got a reaction from Vasily Petrovich in CSC Armbian for RK322x TV box boards   
    DISCLAIMERS (PLEASE READ):
    Everything you can find in this thread (binaries, texts, code snippets, etc...) are provided AS-IS and are not part of official Armbian project. For this reason not people from Armbian project nor myself are responsible for misuse or loss of functionality of hardware. THIS POST explains very well the troubles with TV Boxes and why they are not suitable for everyone Please don't ask about support or assistance in other non-community forums nor in the official Armbian github repository, instead post your questions in this thread, in the TV Boxes forum section (hardware related) or in the Peer-to-peer support section (general linux/software related).  
    Following the recent thread on LibreElec forum about an unofficial image for rk3229 devices, I would like to make public the work made by me and @fabiobassa about bringing rk322x support to armbian.
    The project is now in -> mainline Armbian <- development fork -> here <-
     
    This first page and the last 3 or 4 pages of the thread are enough to get up to date with recent developments.
    Many useful experiences are scattered through the thread, but the most important things are collected here in the first page, so please read it carefully!
     
    Mainline kernel is fully supported and will receive most support in the future. Legacy kernel 4.4 is deprecated, but is kept around only for special purposes.
     
    What works:
    Should boot and work flawlessy on all boards with RK3228a, RK3228b and RK3229, with either DDR2 and DDR3 memories. Mainline u-boot Proprietary OPTEE provided as Trusted Execution Environment (needed for DRAM frequency scaling) All 4 cores are working Ethernet Serial UART (configured at 115200 bps, not 1.5Mbps!) Thermals, CPU and DRAM frequency scaling OTG USB 2.0 port (also as boot device!) EHCI/OHCI USB 2.0 ports MMC subsystem (including eMMC, SD and sdio devices) Hardware video acceleration NAND is available only on legacy kernel. To fully boot from NAND, use the Multitool and its steP-nand installation (instructions are below) Various WIFI over SDIO are supported (SSV6051P, SSV6256P, ESP8089, Realtek chips, etc...), ssv6256p driver is available only on legacy kernel Full GPU acceleration U-boot boot order priority: first the sdcard, then the USB OTG port and eventually the internal eMMC; you can install u-boot (and the whole system) in the internal eMMC and u-boot will always check for images on external sdcard/USB first.  
    Unbrick:
    Technically, rockchip devices cannot be bricked. If the internal flash does not contain a bootable system, they will always boot from the sdcard. If, for a reason, the bootable system on the internal flash is corrupted or is unable to boot correctly, you can always force the maskrom mode shorting the eMMC clock pin on the PCB. Here there is the procedure, but you can also google around if you get stuck on a faulty bootloader, the technique is pretty simple and requires a simple screwdriver.
     
    There are however some unfortunate cases (expecially newer boards) where shorting the eMMC clock pin is difficult or impossibile, like eMMC or eMCP BGA chips with no exposed pins. In those cases pay double attention when burning something on the internal eMMC/eMCP and always test first the image from the sdcard to be sure it works before burning anything on eMMC/eMCP.
     
    Some useful links with pins, pads or procedures for some boards:
    Generic procedure for boards with non-BGA eMMC MXQPRO_V71 - eMCP H20 - eMCP ZQ01 - eMCP  
    NAND vs eMMC vs eMCP difference:
    RK3228 and RK3229 tv boxes comes with three different flash memory chips: eMMC, NAND and eMCP.
    It does not depend upon the market name of the tv box and neither the internal board; manufacturers put whatever they find cheaper when they buy the components.
     
    NAND chip is just the non-volatile memory eMMC chip contains both the non-volatile memory plus a controller. eMCP chip contains the non-volatile memory, a controller for the non-volatile memory (like eMMC), but also contains a bank of DDR SDRAM memory on the same physical chip.  
    The difference is very important, because eMMC and eMCP are far easier to support at various levels: the controller deals with the physical characteristics of the non-volatile memory, so the software has no to deal with.
    NAND chips instead are harder to support, because the software is required to deal with the physical characteristics and non-standard things that depends upon the NAND manufacturer.
     
    If you have a NAND chips you're unlucky because mainline kernel currently cannot access it, but also because you need special care and instructions explained later.
     
    You can discover if you have a NAND, eMMC or eMCP chip looking on the board are reading the signature on the flash memory chip.
    The Multitool (see later) also can detect which chip you have onboard: the program will warn you at startup if you have a NAND chip.
     
    NAND bootloader upgrade:
    IMPORTANT: don't do this is you have an eMMC or eMCP; skip this paragraph if you are unsure too!
    For very expert people who are having issues when (re)booting images, there is the chance to upgrade the bootloader on NAND.
    The NAND bootloader is nothing else than a regular idbloader (see official rockchip documentation) but contains some bits to correctly access the data on your flash memory.
    Upgrading requires to erase the existing flash content, in the worst case will require you to follow the Unbrick procedure above or restore an older but more compatible bootloader.
    If you are not mentally ready to overcome possible further issues, don't do this!
     
    The detailed instructions and the binaries are available at this post
     
    Multimedia:
    Mainline kernel: 3D acceleration is provided by Lima driver and is already enabled. Hardware video decoding: https://forum.armbian.com/topic/19258-testing-hardware-video-decoding-rockchip-allwinner/ Deprecated legacy kernel: multimedia features, like OpenGL/OpenGL ES acceleration, hardware accelerated Kodi, ffmpeg and mpv you can take a look to this post An effective tutorial from @Hai Nguyen on how to configure a box as a hi-quality music player using an USB audio card, and controlling it via remote control is available in this post  
    Brief explanation about kernel naming:
    current kernel is the mainline LTS kernel version, most maintained and tested. This is the suggested version for production devices. If you don't know what to pick, pick this. legacy kernel (version 4.4) is provided by manufacturer; it is deprecated, unmaintained and not suggested. edge kernel is the development mainline kernel version, with experimental features and drivers; usually stable but perhaps suitable for production devices.  
    You can switch from one kernel flavour to another using armbian-config or manually via apt.
     
    Installation (via SD card):
    Building:
    You can build your own image follow the common steps to build armbian for other tv boxes devices: when you are in the moment to choose the target board, switch to CSC/TVB/EOL boards and select "rk322x-box" from the list.
     
    Download prebuilt images from the following links:
    Archive builds (GPG-signed) - https://imola.armbian.com/dl/rk322x-box/archive/ SUGGESTED - Nightly built from trunk each week by Armbian servers (GPG-signed) - https://github.com/armbian/community Old images provided by me (unsigned and outdated) - https://users.armbian.com/jock/rk322x/armbian/stable  
    Archived/older images:
    https://armbian.hosthatch.com/archive/rk322x-box/archive/
     
    Multitool:
    The Multitool is a small but powerful tool to do quick backup/restore of internal flash, but also burn images and general system rescue and maintenance via terminal or SSH.
    Compressed images will be uncompressed on fly.
    Multitool - A small but powerful image for RK322x TV Box maintenance (instructions to access via network here)  
    Quick installation instructions on eMMC:
    Build or download your preferred Armbian image and a copy of the Multitool; Burn the Multitool on an SD card; once done, place the Armbian image in images folder of the SD card NTFS partition; Plug the SD card in the TV box and plug in the power cord. After some seconds the blue led starts blinking and the Multitool appears; OPTIONAL: you can do a backup of the existing firmware with "Backup flash" menu option; Choose "Burn image to flash" from the menu, then select the destination device (usually mmcblk2) and the image to burn; Wait for the process to complete, then choose "Shutdown" from main menu; Unplug the power cord and the SD card, then replug the power cord; Wait for 10 seconds, then the led should start blinking and HDMI will turn on. The first time the boot process will take a couple of minutes or more because the filesystem is going to be resized, so be patient and wait for the login prompt. On first boot you will be asked for entering a password for root user of your choice and the name and password for a regular user Run sudo rk322x-config and select your board characteristics to enable leds, wifi chips, high-speed eMMC, etc... Run sudo armbian-config to configure timezone, locales and other personal options Congratulations, Armbian is now installed and configured!  
    Despite the procedure above is simple and reliable, I always recommend to first test that your device boots Armbian images from SD Card.
    Due to the really large hardware variety, there is the rare chance that the images proposed here may not boot. If a bad image is burned in eMMC, the box may not boot anymore forcing you to follow the unbrick section at the top of this post.
     
    Quick installation instructions on NAND:
    Build or download your preferred Armbian image and a copy of the Multitool; Burn the Multitool on an SD card; once done, place the Armbian legacy kernel image in images folder of the SD card NTFS partition; Plug the SD card in the TV box and plug in the power cord. After some seconds the blue led starts blinking and the Multitool appears; OPTIONAL: you can do a backup of the existing firmware with "Backup flash" menu option; Choose "Burn Armbian image via steP-nand" from the menu, then select the destination device (usually rknand0) and the image to burn; Wait for the process to complete, then choose "Shutdown" from main menu; Unplug the power cord and the SD card, then replug the power cord; Wait for 10 seconds, then the led should start blinking and HDMI will turn on. The first time the boot process will take a couple of minutes or more because the filesystem is going to be resized, so be patient and wait for the login prompt. On first boot you will be asked for entering a password for root user of your choice and the name and password for a regular user Run sudo rk322x-config and select your board characteristics to enable leds, wifi chips, etc... Run armbian-config to configure timezone, locales and other personal options Congratulations, Armbian is now installed!  
    Alternative: you can install the bootloader in NAND and let it boot from SD Card or USB:
    Download a copy of the Multitool and burn it on an SD card; Plug the SD card in the TV box and plug in the power cord. After some seconds the blue led starts blinking and the Multitool appears; RECOMMENDED: make a backup of the existing firmware with "Backup flash" menu option; Choose "Install Jump Start for Armbian" menu option: the Jump Start uses the internal NAND to boot from external SD Card or external USB Stick; Follow the general instructions to boot from SD Card below, skip the first erase eMMC step.  
    Quick installation instructions to boot from SD Card:
    If you are already running Armbian from eMMC, skip to the next step. Instead if you are running the original firmware you need to first erase the internal eMMC; to do so download the Multitool, burn it on an SD Card, plug the SD Card and power the TV Box. Use "Backup flash" if you want to do a backup of the existing firmware, then choose "Erase flash" menu option. Build or download your preferred Armbian image; Uncompress and burn the Armbian image on the SD Card; Plug the SD Card in the TV Box and power it on; Wait for 10 seconds, then the led should start blinking and HDMI will turn on. The first time the boot process will take a couple of minutes or more because the filesystem is going to be resized, so be patient and wait for the login prompt; On first boot you will be asked for entering a password for root user of your choice and the name and password for a regular user Run sudo rk322x-config and select your board characteristics to enable leds, wifi chips, high-speed eMMC or NAND, etc... Run armbian-config to configure timezone, locales and other personal options, or also to transfer the SD Card installation to internal eMMC; Congratulations, Armbian is running from SD Card!  
    A note about boot device order:
    With Armbian also comes mainline U-boot. If you install Armbian or just the bootloader in the eMMC or the Jump Start on internal NAND, the bootloader will look for valid bootable images in this order:
    External SD Card External USB Stick in OTG Port Internal eMMC  
    Installation (without SD card, board with eMMC)
    If you have no sd card slot and your board has an eMMC, you can burn the armbian image directly on the internal eMMC using rkdeveloptool and a male-to-male USB cable:
     
    Download your preferred Armbian image from Armbian download page and decompress it. Download the rk322x bootloader: rk322x_loader_v1.10.238_256.bin Download a copy of rkdeveloptool: a compiled binary is available in the official rockchip-linux rkbin github repository. Unplug the power cord from the tv box Plug an end of an USB Male-to-male cable into the OTG port (normally it is the lone USB port on the same side of the Ethernet, HDMI, analog AV connectors) while pressing the reset microbutton with a toothpick. You can find the reset microbutton in a hole in the back of the box, but sometimes it is hidden into the AV analog jack Plug the other end of the USB Male-to-male cable into an USB port of your computer If everything went well, run lsusb: you should see a device with ID 2207:320b Run sudo rkdeveloptool rd 3 (if this fails don't worry and proceed to next step) Run sudo rkdeveloptool db rk322x_loader_v1.10.238_256.bin Run sudo rkdeveloptool wl 0x0 image.img (change image.img this with the real Armbian image filename) Unplug the power cord Done!  
    Installation (without SD card, board with NAND)
    If you are in the unfortunate case you can't use an SD card for installation and your board has a NAND chip, you still have an option to use the quick Multitool installation steps via USB.
     
    Obtain a copy of rkdeveloptool: a compiled binary is available in the official rockchip-linux rkbin github repository. Unplug the power cord from the tv box Plug an end of an USB Male-to-male cable into the OTG port (normally it is the lone USB port on the same side of the Ethernet, HDMI, analog AV connectors) while pressing the reset microbutton with a toothpick. You can find the reset microbutton in a hole in the back of the box, but sometimes it is hidden into the AV analog jack Plug the other end of the USB Male-to-male cable into an USB port of your computer If everyting went well, using lsusb you should see a device with ID 2207:320b Run sudo rkdeveloptool wl 0x4000 u-boot-main.img (download u-boot-main.img.xz , don't forget to decompress it!) Unplug the power cord  
    Now you can follow the instructions on how to install on eMMC/NAND via SD card, just use instead an USB stick to do all the operations and plug it into the USB OTG port. Once you reboot, USB OTG port will be used as a boot device.
     
    NOTE: NAND users without SD slot may be unhappy to know that it will be difficult to do extra maintenance with Multitool in case something breaks in the installed Armbian system: installing u-boot-main.img makes the installed system unbootable because it is missing the NAND driver.
     
     
    Alternative backup, restore and erase flash for EXPERTS:
    These backup, restore and erase flash procedures are for experts only. They are kept here mostly for reference, since the Multitool is perfectly able to do same from a very comfy interface and is the suggested way to do maintenance.
     
    Backup:
    Obtain a copy of rkdeveloptool: a compiled binary is available in the official rockchip-linux rkbin github repository. If you prefer, you can compile it yourself from the sources available at official rockchip repository Unplug the power cord from the tv box Plug an end of an USB Male-to-male cable into the OTG port (normally it is the lone USB port on the same side of the Ethernet, HDMI, analog AV connectors) while pressing the reset microbutton with a toothpick. You can find the reset microbutton in a hole in the back of the box, but sometimes it is hidden into the AV analog jack Plug the other end of the USB Male-to-male cable into an USB port of your computer If everyting went well, using lsusb you should see a device with ID 2207:320b change directory and move into rkbin/tools directory, run ./rkdeveloptool rfi then take note of the FLASH SIZE megabytes (my eMMC is 8Gb, rkdeveloptool reports 7393 megabytes) run ./rkdeveloptool rl 0x0 $((FLASH_SIZE * 2048)) backup.data (change FLASH_SIZE with the value you obtained the step before) once done, the internal eMMC is backed up to backup.data file  
    Restore: first we have to restore the original bootloader, then restore the original firmware.
    Running rkdeveloptool with these switches will accomplish both the jobs:
    ./rkdeveloptool db rk322x_loader_v1.10.238_256.bin Downloading bootloader succeeded. ./rkdeveloptool ul rk322x_loader_v1.10.238_256.bin Upgrading loader succeeded. ./rkdeveloptool wl 0x0 backup.data Write LBA from file (100%) Download here:
     
    Erase the flash memory: clearing the internal eMMC/NAND memory makes the SoC look for external SD Card as first boot option.
    If there isn't any suitable SD Card, the SoC enters maskrom mode, which can then be used for full eMMC/NAND access using rkdeveloptool. This is perfectly fine if your box has an eMMC flash memory.
    NOTE: In case you have a NAND flash memory this option is however discouraged. The original bootloader contains some special parameters to correctly access the data. Clearing the flash memory will probably garbage the NAND data and restoring the bootloader may require some special instructions.
     
    Obtain a copy of rkdeveloptool: a compiled binary is available in the official rockchip-linux rkbin github repository. If you prefer, you can compile it yourself from the sources available at official rockchip repository Unplug the power cord from the board Plug an end of an USB Male-to-male cable into the OTG port (normally it is the lone USB port on the same side of the Ethernet, HDMI, analog AV connectors) while pressing the reset microbutton with a toothpick. You can find the reset microbutton in a hole in the back of the box, but sometimes it is hidden into the AV analog jack Plug the other end of the USB Male-to-male cable into an USB port of your computer If everyting went well, using lsusb you should see a device with ID 2207:320b run ./rkdeveloptool ef and wait a few seconds once done, the internal eMMC is erased and the device will boot from the sdcard from now on  
    Partecipation and debugging:
    If you want to partecipate or need help debugging issues, do not hesitate to share your experience with the installation procedure of the boxes.
    In case of issues and missed support, provide as many as possible of these things is very useful to try and bring support for an unsupported board:
     
    some photos of both sides of the board. Details of the eMMC, DDR and Wifi chips are very useful! upload the device tree binary (dtb) of your device. We can understand a lot of things of the hardware from that small piece of data; and alternative is a link to the original firmware (you can do a full backup with the Multitool); dmesg and other logs (use armbianmonitor -u that automatically collects and uploads the logs online) attach a serial converter to the device and provide the output of the serial port;  
    Critics, suggestions and contributions are welcome!
     
    Credits:
    @fabiobassa for his ideas, inspiration, great generosity in giving the boards for development and testing. The project of bringing rk322x into armbian would not have begun without his support! Justin Swartz, for his work and research to bring mainline linux on rk3229 (repository here) @knaerzche for his great contribution to libreelec support and mainline patches @Alex83 for his patience in testing the NAND bootloader upgrade procedure on his board @Jason Duhamell for his generous donation that allowed researching eMCP boards and esp8089 wifi chip
  16. Like
    jock got a reaction from fabiobassa in CSC Armbian for RK322x TV box boards   
    Hmmm, I did not understand if the board crashes or OMV becomes unresponsive (and which part, since OMV leverages nginx and php for the web admin and samba/nfs/ftp for the file serving services).
     
    You say that you can "ssh the box", but you mean that you can login via ssh and the board still operates normally or the ssh service is apparently responding but you can't login?
    I have a board with debian buster that is running OMV perfectly fine for several months right now, but also I'm experimenting with an eMCP board that has Home Assistant and running as wireless AP without any issues. Both of the board are running headless with no problems or crashes. The eMCP board is a MXQPRO_V73, should not be far different than your MXQ_V71 (I may guess it is a MXQPRO_V71? You could post some high resolution photos that may be helpful identifying the board and its components)
  17. Like
    jock got a reaction from LFPoulain in CSC Armbian for RK3318/RK3328 TV box boards   
    ­DISCLAIMER (PLEASE READ): everything you can find in this thread (binaries, texts, code snippets, etc...) are provided AS-IS and are not part of official Armbian project. For this reason not people from Armbian project nor myself are responsible for misuse or loss of functionality of hardware.

    Please don't ask about support or assistance in other non-community forums nor in the official Armbian github repository, instead post your questions in this thread, in the TV Boxes forum section (hardware related) or in the Peer-to-peer support section (general linux/software related).

    Thank you!
     
    This thread is to give stable and mature long-term range support to rk3318/rk3328 found in many tv boxes in Armbian project as Community Supported Configuration (CSC).
    The current work is mainlined into Armbian project, but your mileage may vary; most recent developments live on my personal fork on github -> here <-
     
    Important notes: is just a personal opinion, but apparently widely supported, that rk3318 chip is not an official rockchip part. They probably are scrap rk3328 parts which have not passed conformance tests but are sold anyway to tv boxes manufacturers. They don’t reach the same operating frequency of the rk3328, have much higher leakage currents (and thus higher temperatures) and often the boards they are installed on are low quality with low quality components, in fact a very very common issue is the eMMC failure due to bad parts and bad soldering. So said, I personally suggest not to buy any rk3318 tv box, but instead find a properly supported SBC (Single Board Computer) if you need a reliable product. In the unfortunate case you already have such product, this thread may help you have some fun with them.
     
    What works:
        • Works on RK3318 and RK3328 TV boxes with DDR3 memories
        • Mainline u-boot
        • Mainline ATF provided as Trusted Execution Environment
        • All 4 cores are working
        • Ethernet
        • Serial UART (configured at stock 1.5Mbps)
        • Thermals and frequency scaling
        • OTG USB 2.0 port (also as boot device!)
        • EHCI/OHCI USB 2.0 ports and XHCI USB 3.0 ports
        • MMC subsystem (including , SD and sdio devices)
        • Hardware video acceleration (fully supported via RKMPP on legacy kernel, support via hantro and rkvdec kernel driver on mainline)
        • Various WIFI over SDIO are supported
        • Full acceleration on legacy kernel and mainline kernel
        • U-boot boot order priority: first the sdcard, then the USB OTG port and eventually the internal ; you can install u-boot (and the whole system) in the internal and u-boot will always check for images on external sdcard/USB first.
     
    Unbrick:
    Technically, rockchip devices cannot be bricked. If the internal flash does not contain a bootable system, they will always boot from the sdcard. If, for a reason, the bootable system on the internal flash is corrupted or is unable to boot correctly, you can always force the maskrom mode shorting the clock pin on the PCB. The procedure is explained here for rk322x, but for rk3318/28 is the same.

    In most of the rk3318/28 boards, shorting the clock pin is difficult or impossible because eMMC are BGA chips with no exposed pins. Pay double attention when burning something on the internal flash memory and always test first the image booting from the sdcard to be sure it works before burning anything in internal flash.
     
    This is a list of posts where forum users have been able to spot the eMMC clock pin to trigger the maskrom mode:
    H96 Max+ (board signature: RK3318_V1.4) by @Gausus X88 PRO 10 (board signature: X88_PRO_B) by @mathgaming Ninkbox N1 Max RK3318 by @enigmasphinx  
     
    Partecipation and debugging:
    If you want to partecipate or need help debugging issues, do not hesitate to share your experience with the installation procedure of the boxes.
    In case of issues and missed support, provide as many as possible of these things is very useful to try and bring support for an unsupported board:
     
    some photos of both sides of the board. Details of the eMMC, DDR and Wifi chips are very useful! upload the device tree binary (dtb) of your device. We can understand a lot of things of the hardware from that small piece of data; and alternative is a link to the original firmware (you can do a full backup with the Multitool); dmesg and other logs (use armbianmonitor -u that automatically collects and uploads the logs online) attach a serial converter to the device and provide the output of the serial port;  
    Multimedia:
    Mainline kernel: 3D acceleration is provided by Lima driver and is already enabled. Hardware video decoding: https://forum.armbian.com/topic/19258-testing-hardware-video-decoding-rockchip-allwinner/ Legacy kernel: If you need multimedia features, like OpenGL/OpenGL ES acceleration, hardware accelerated Kodi, ffmpeg and mpv you can take a look to this post  
    Installation (via SD card):
    Building:
    You can build your own image follow the common steps to build armbian for other tv boxes devices: when you are in the moment to choose the target board, switch to /TVB/ boards and select "rk3318-box" from the list.
       
    Prebuilt images:
    Archived images - built by Armbian servers and GPG-signed: https://imola.armbian.com/dl/rk3318-box/archive/ Nightly stables - built from trunk by Armbian servers and GPG-signed: https://github.com/armbian/community Stables provided by me (unsigned): https://users.armbian.com/jock/rk3318/  
    Multitool:
    Multitool - A small but powerful image for RK3318/RK3328 TV Box maintenance. Download it from here  
    Quick installation instructions on eMMC:
    Build or download your preferred Armbian image and a copy of the Multitool; Burn the Multitool on an SD card; once done, place the Armbian image in images folder of the SD card NTFS partition; Plug the SD card in the TV box and plug in the power cord. After some seconds the blue led starts blinking and the Multitool appears; OPTIONAL: you can do a backup of the existing firmware with "Backup flash" menu option; Choose "Burn image to flash" from the menu, then select the destination device (usually mmcblk2) and the image to burn; Wait for the process to complete, then choose "Shutdown" from main menu; Unplug the power cord and the SD card, then replug the power cord; Wait for 10 seconds, then the led should start blinking and HDMI will turn on. The first time the boot process will take a couple of minutes or more because the filesystem is going to be resized, so be patient and wait for the login prompt. On first boot you will be asked for entering a password for root user of your choice and the name and password for a regular user Run rk3318-config to configure the board specific options Run armbian-config to configure timezone, locales and other personal options Congratulations, Armbian is now installed!  
    Despite the procedure above is simple and reliable, I always recommend to first test that your device boots Armbian images from SD Card.
    Due to the really large hardware variety, there is the rare chance that the images proposed here may not boot. If a bad image is burned in , the box may not boot anymore forcing you to follow the unbrick section at the top of this post.
     
    Quick installation instructions to boot from SD Card:
    If you are already running Armbian from eMMC, skip to the next step. Instead if you are running the original firmware you need to first erase the internal flash; to do so download the Multitool, burn it on an SD Card, plug the SD Card and power the TV Box. Use "Backup flash" if you want to do a backup of the existing firmware, then choose "Erase flash" menu option. Build or download your preferred Armbian image; Uncompress and burn the Armbian image on the SD Card; Plug the SD Card in the TV Box and power it on; Wait for 10 seconds, then the led should start blinking and HDMI will turn on. The first time the boot process will take a couple of minutes or more because the filesystem is going to be resized, so be patient and wait for the login prompt; On first boot you will be asked for entering a password for root user of your choice and the name and password for a regular user Run rk3318-config to configure the board specific options Run armbian-config to configure timezone, locales and other personal options, or also to transfer the SD Card installation to internal ; Congratulations, Armbian is running from SD Card!  
    Tutorial - How to install Armbian on your TV Box (by @awawa) :
    https://www.hyperhdr.eu/2022/01/tv-box-mania-i-part-x88-pro-10.html
    A note about boot device order:
    With Armbian also comes mainline U-boot. If you install Armbian, the bootloader will look for valid bootable images in this order:
    External SD Card External USB Stick in OTG Port Internal  
    The Multitool does not boot / How to burn image directly on eMMC:
     
    Some boards have the sdcard attached to an auxiliary (called also sdmmc_ext or external) controller which is not the common one.
    Forum findings declare that those boards are not able to boot from sdcard with stock firmware and they neither do in maskrom mode: the stock firmware always boots even if you put the multitool on sdcard.
     
    In such case, burning images directly on eMMC is the only way to have a working Armbian installation.
    You can follow these instructions by @fabiobassa to burn images directly on eMMC:
     
    https://forum.armbian.com/topic/17597-csc-armbian-for-rk3318rk3328-tv-box-boards/?do=findComment&comment=130453
     
    Notes and special hardware:
    Script to change DDR memory frequency here Wireless chip AP2734, SP2734, HY2734C and similars: they are clones of AmPAK AP6334 which is combo wifi + bluetooth of broadcom BCM4334/B0 chips. You may need a special nvram file, instructions by @paradigman are here  
    Critics, suggestions and contributions are welcome!
     
    Credits:
    @fabiobassa for his ideas, inspiration, great generosity in giving the boards for development and testing. The project of bringing rk3318 into armbian would not have begun without his support! @hexdump for his precious support in early testing, ideas and suggestions
    @MX10.AC2Nfor his patience in testing mxq-rk3328-d4 board support
    All the rockhip64 maintainers at Armbian project who have done and do most of the work to support the platform
     
     
  18. Like
    jock got a reaction from MattWestB in CSC Armbian for RK3318/RK3328 TV box boards   
    @MattWestB AFAIK rockchip devices don't look for USB boot as Amlogic instead do. I don't know if newer SOCs like rk356x or rk3588 do that, but for older SOCs USB boot it is not mentioned anywhere.
     
    @r00tl3ss you have to select a piece of text and a quote popup will appear.
    You may indeed try the cp210x USB serial, maybe it can reach the 1.5mbps speed even if it is not officially rated for.
     
     
  19. Like
    jock reacted to Igor in Armbian 22.11 (Goral) Release Thread   
    Made a release build & images are uploading and syncing. This will take at least a day ... we continue to test. Repository update can wait a bit. 
  20. Like
    jock reacted to Hqnicolas in CSC Armbian for RK3318/RK3328 TV box boards   
    @jock My Hero!

     

    5.15 ~ 5.18 fells laggy
    this 5.19 from @jock needs to be the standart

    H96 MAX V12 RK3318 4gb/64gb Board v1.4
    Desktop 1.3ghz verry responsive and also fix HDMI 4K display problems
    LOG: http://ix.io/4gJ6
    GeekBench: https://browser.geekbench.com/v5/cpu/18845814
     
  21. Like
    jock got a reaction from Hqnicolas in CSC Armbian for RK3318/RK3328 TV box boards   
    Okay I made kernel deb packages 5.19 with libreelec patches to test an upgrade on a live system, as usual can be installed with dpkg -i
    Kernel 5.19.15 image kernel 5.19.15 dtb  
    And also a ready-made debian bullseye testing image
  22. Like
    jock got a reaction from marras in CSC Armbian for RK322x TV box boards   
    Once you get a valid backup you can extract the dtb from the original image. But anyway I should already have a dtb for the t95n around.
     
    In theory you should not even have the black screen if Android is still in the internal flash.
    Normally Armbian on sdcard boots if it is already installed in the internal flash or the internal flash is just empty.
    If Android is installed in the internal flash, the only thing that boots from sdcard is the multitool.
    Then you can verify that the backups are sane (just open the files on a regular PC) and then may proceed to erase the internal flash to try armbian from sdcard.
    You also have what I think are the serial pads if you have a serial adapter to connect for full boot logging.
     
    The HDMI problem may be due to several reasons: incompatibility with your board, bad cable, bad monitor/tv, ... and the previous lockups during backups may be due to a bad power adapter for example (those coming with the tvbox are generally crap)
  23. Like
    jock reacted to fabiobassa in CSC Armbian for RK322x TV box boards   
    @Henn
    This forum Is about armbian and Linux, not android 
    Go find Android forum please
     
     
     
     
  24. Like
    jock got a reaction from tmm1 in Hannspree AK01 "bricked"   
    Extensions have no meaning in the Unix world, you can even rename that file with a ".exe" extension but it does not change anything. What counts is the data in the file.
     
    The procedure requires that you first erase the eMMC with rkdeveloptool ef command; when done turn the box off, then turn the box on and you will be in MaskROM mode .
    Once there, follow the steps from "Restore backup" paragraph in the link above:
    you have to first use rkdeveloptool db command to upload a program to the SoC to program (no pun intended) the eMMC you can skip the rkdeveloptool ul command (it was necessary for manual backups, not for multitool backups) run the rkdeveloptool wl command  
    Maybe the serial is switched to 1.5Mbps; some firmwares use 115200, some others use 1.5Mbps and may show you garbled data.
    On multitool and armbian by default I use 115200bps for compatibility.
     
    Yes, both of these behaviours are expected.
     
    The OTG port works as a power supply since it is supposed to be bidirectional. In fact when you do maintenance in maskrom mode you have not to connect the regular power supply but just the USB cable. Not all boards work this way though, but it looks like that both mine and yours behave this way.
    rkdeveloptool does not let you do anything with the box in MaskROM mode because you first have to upload the famous program with rkdeveloptool db I talked above. Once you do that, then you can use the other rkdeveloptool commands (including ef, wl, etc...)
     
    A lot of confusion comes from a fact: rockchip u-boot bootloader that is shipped with original firmwares, when stuck or when the reset button is pressed, provides the RockUSB mode, which is similar to MaskROM, but it is not the same! Unfortunately lsusb has no chances to recognize the difference and will tell you the board is in MaskROM mode, but it is not true. When you are in RockUSB mode, rkdeveloptool works without the bootstrap program because on the other side there is u-boot that is already answering.
    Another very very important difference between MaskROM and RockUSB modes is that the latter does not allow you to write the whole firmware: it will skip the first 0x2000 sectors, not allowing to overwrite the bootloader part, plus it will shift by the same amount the image you're going to write on the internal flash. Clearly this breaks everything, because partitions will not be in the expected positions anymore.
     
    To make the long story short: always operate on the internal flash when you're in real MaskROM mode.
    To get into real MaskROM mode you have to:
    erase the internal flash, or gate the clock pin with the screwdriver/whatever trick This is because the SoC on first instance tries to boot from eMMC. If it does not find a valid bootloader, then tries to boot from sdcard. If a valid bootloader is not there too, then stays there waiting in MaskROM mode waiting for an input from USB OTG port. No firmware/software has been loaded at this point, and that's the reason why you must upload the bootstrap program with rkdeveloptool db command before you can do anything else.
     
    Yes, this is the problem I talked you about the differences on the boards: the kernel is stuck somewhere because the device tree tells about a hardware configuration but your board has a different hardware configuration.
    If you burn the image on a sdcard, you can edit the file /boot/armbianEnv.txt and change verbosity=1 to verbosity=7 to let the kernel to show the whole log on the serial. This is of great help when you're debugging.
     
    You may also try armbian images for the Asus Tinkerboard-S, which has the rk3288 SoC as well and share many similarities.
     
    edit: you didn't say if you tried to just restore the backup with the multitool. Did you try? That's the easiest way to restore the backup...
  25. Like
    jock got a reaction from Igor in Orange Pi 4 LTS not booting when USB port(s) are used   
    Checked in the last few days, with both USB2 ports and a PS/2 -> USB adapter. The board did boot fine with the thing attached with kernels 5.15, 5.19 and 6.0
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines