Jump to content

Recommended Posts

Posted

Hi!
I have an old Allwinner A10 based tablet that runs on Android. I want to install some other OS on it. I tried the instructions on linux-sunxi.org and created a page for the tablet:

https://linux-sunxi.org/Softwinners_crane

I extracted the FEX file from an image I got from the manufacturers a long time ago: http://github.com/linux-sunxi/sunxi-boards/pull/72/files

 

The linux-sunxi mailing list pointed out that my tablet is similar to Topwise A721, so I used that dts file to compile u-boot and the kernel, and tried to boot it through an SD card. Trying to boot that, u-boot starts, and then gets stuck at "Starting kernel..."

 

Then I found this:


After following this and building armbian, I realised that there is no script.bin to replace anymore (I'm guessing because now we use device trees?), so unable to boot this as well.

 

What should I do to make this work with armbian? My guess is that I need to create a new dts or correct the Topwise A721 dts (https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/allwinner/sun4i-a10-topwise-a721.dts) and then try again. The only problem is that I have no experience with device trees.  

 

Would really appreciate help on getting this to work, thanks! :) 

Posted

HI,

 

I dont believe it is necessary to recreate the Topwise A721 dts as it should already be included in the kernel sources used. What most likely needs to be done as a minimum is config file so that the Armbian build system recognizes the board and knows how to handle it. Admittedly I have never added a board so I can only speculate. A problem you may face is that the internal LCD may no longer work with the latest kernels.

 

best of luck

 

Ryzer

Posted

Hi!

Great, that's a good starting point. So where could I find a reference file I can edit and align with my tablet? And where should I place this file? How would this file (possibly) connect to some dts? (This is just for my curiosity)

 

Thank you!

Posted

All Armbian board configurations files live in build/config/board/

 

Besides the Pcduino2 Cubieboard and OlinuXino-lime board, I don't know what other A10 boards still have some level of support. After that the next step would probably be to confirm that it works with uboot. Here you have another config file and dts. For any tweaks to uboot you will need to pass uboot-patch when running compile.sh. Note that when you do this you will need to open a new tab and navigate to cache/sources/u-boot-worktree/

 

Similiarly for the kernel you would navigate to cache/sources/kernel/

currently 6.12 is "current" while 6.14 is "edge"

 

Hope this helps

 

Ryzer

Posted

Great, so I used the config file provided in the previous post that I quoted, with a small change: I replaced "LINUXFAMILY" with "BOARDFAMILY".

Am I to place patches to the kernel and u-boot inside userpatches? When in the build process should I do that?

U-boot does work currently, and the original problem when I try to boot is that after "Starting Kernel..." I have nothing visible over HDMI or on the on board display (Or no way to check that I know of if anything is working).

What I understand currently is that since U-boot works, I need to first provide a dts file that makes the display work, and then configure armbian  build script to use that dts file, is that the way to go?
On linux-sunxi mailing list I was told that the display on this works with the simple panel driver using the "starry kr070pe2t" entry.

At this point I am not sure what the immediate next step should be.

Thank you! :)

Posted

Right to clarify what I described earlier was the patch creation process, where you would modify an existing file or if the file does not exist you would create in the relevant. After running for a bit the build process will pause. At this point you would need to open a new tab and navigate to cache/sources/linux-kernel-worktree/6.12__sunxi__armhf/arch/arm/boot/dts/allwinner. Here you would need to amend the sun4i-a10-topwise-a721.dts.

 

According to the dts it already has the panel node so the on board display should at least work unless the driver is broken or device tree bindings have changed. Unfortunately I havent worked with panels so cannot provide much further assistance for other than confirming that an entry exist in the simple panel driver.

 

sudo modinfo panel-simple | grep starry
[sudo] password for ryan:
alias:          of:N*T*Cstarry,kr070pe2tC*
alias:          of:N*T*Cstarry,kr070pe2t
ryan@pcduino2-1:~$

 

Normally to get hdmi to work you simply have to enable the hdmi nodes plus create a hdmi connector node. I have attached the patch that I use on my pcduino2, applying the same alterations to the dts of the  topwise's dts should work. I have had issues with hdmi display in 6.12 which I found a work around for but not perfect as we have to modify the hdmi driver. From What I can tell the problem is related to atomic check function: https://patchwork.kernel.org/project/linux-arm-kernel/patch/20241130-hdmi-mode-valid-v5-10-742644ec3b1f@linaro.org/

It may be fixed in kernel 6.14 but I havent tested it yet.

 

save the changes in your text editor and exit. Return to the tab running the build script, hit enter and it will generate a preview of the changes and ask if you are happy with the changes or not. type 'y' to accept. Luckily the build process will helpfully walk you through these steps. Once the build process has finished go to output/patch/. and rename the newly generated patch something useful so that you remember its purpose. Then move it into patches or userpatches. Which is up to you but personally, I prefer to have my patches in userpatches unless it is something I plan to merge in future.

whenever you run git pull to fetch the latest version of armbian build, the patch directory is likely to be updated whereas userpatches is not affected. A caveat with userpatches is that full directory structure is not pre-existing so you have to manually create it, mirroring the patches directory. Also note that userpatches are applied after patches in the patch directory. Did you clone Armbian build directly or are you work off your own fork?

 

Now what i tend to do is rerun the build process to check that the patch was applied successful. So rerun ./compile.sh BOARD=topwise-A721 (Replace with the name used in your config file) BRANCH=current RELEASE=bookworm kernel-patch. if successful it should appear in the list of patches and if applied under usepatches it will helpful be the last entry on the list. Unless you have any further patches to apply you can then go on to running a full build.

 

I am suprised no one has yet done a video on the patching process yet

 

Have you attempted disassembling the tablet to check for any solder pads present which could be the serial console? If there is then it may be possible to hook up a usb to serial converter. This could at least be a solid indicator to confirm that the device is at least booting.

 

best of luck

 

Ryzer

pcduino2-hdmi-enable.patch

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