Author Topic: Skelton - Help me compile a new Legacy possibility?  (Read 1912 times)

PsyOps (OP)

  • *
  • Posts: 414
    • Section Eight
Re: Skelton - Help me compile a new Legacy possibility?
« Reply #105 on: September 11, 2017, 07:23:11 am »
So it turns out it was a bad java  install. It seems to have compiled. (rock firmware). Ill try and move on from here.

CommanderKitler

  • *
  • Posts: 68
Re: Skelton - Help me compile a new Legacy possibility?
« Reply #106 on: September 11, 2017, 07:40:06 am »
I am not doing anything right skelton. So far I have downloaded the firefly-rk3288 firmware and its over 20 gb. I have also downloaded CWM firmware to try and compile the recovery portion, again 20+ GBs. I am trying to merge everything into one project folder and I just don't know what I am doing. Using the RK3xxx I also extracted boot, system, recovery, and kernel folders. ( From your Legacy Rom )

How can I make all of this one working project folder with all the needed files for rk3288 and cwm?
also what files can I get rid of? I know that it is downloaded to try and be compatible with as many devices as possible, I just want the rk3288 files.

I also looked through output and got it to compile a little further, but i got this:

Code: [Select]
[email protected]:~/proj/firefly-rk3288$ sudo ./mkimage.sh
/bin/bash: java: command not found
/bin/bash: java: command not found
/bin/bash: java: command not found
/bin/bash: java: command not found
/bin/bash: java: command not found
TARGET_PRODUCT=rk3288
TARGET_HARDWARE=rk30board
grep: /home/psyops/proj/firefly-rk3288/out/target/product/rk3288/root/init.rk30board.rc: No such file or directory
grep: /home/psyops/proj/firefly-rk3288/out/target/product/rk3288/root/init.rc: No such file or directory
system filesysystem is
create boot.img without kernel... done.
create recovery.img with kernel and with out resource... done.
create misc.img.... done.
create system.img... ./mkimage.sh: line 102: mkyaffs2image: command not found

Inside mkimage.sh, it is
Code: [Select]
Line:100) else
Line:101) mkdir -p $IMAGE_PATH/2k $IMAGE_PATH/4k
Line:102) mkyaffs2image -c 2032 -s 16 -f $OUT/system $IMAGE_PATH/2k/system.img
Line:103) mkyaffs2image -c 4080 -s 16 -f $OUT/system $IMAGE_PATH/4k/system.img
Line:104) fi
Line:105) echo "done."

any ideas?

Your makefile is referencing a binary called mkyaffs2image which it cannot find.
have you checked for it in your project files? If it's there you have to either make it available as a command in your system (by copying it to /usr/bin/ by using "sudo cp /insert/path/to/mkyaffs2image  /usr/bin/mkyaffs2image") or use a text editor to change line 102 and 103 from "mkyaffs2image -c ..." to " /your/path/to/mkyaffs2image -c ..."
If you're missing the file my best guess is pulling the yaffs source code from git, compiling it and installing it like so:

Code: [Select]
sudo apt-get install git

mkdir build
cd build

git clone git://www.aleph1.co.uk/yaffs2

cd yaffs2

make

sudo make install


also it seems you're missing the jdk or jre as it cannot find the java command. Try opening up your terminal and type "java" and see if it tells you "command not found". If thats the case you have to check your java installation because there is something wrong with it.

Also stop using sudo for everything. You are trying to compile something in your personal user folder where you have all the permissions you need as everything in there is owned by your user. The root user accessed by the sudo command is the ultimate system authority and is only needed for doing changes to files and folders outside of your userfolder(root is powerful enough to destroy your complete OS with one simple command). In your case you should only use sudo with apt-get.

Also NEVER EVER compile as root, especially if it is not your own code your trying to compile. Doing "sudo ./mkimage.sh" means you're giving this script the permission to do permanent changes to your operating system.
Also the compiled binary files resulting from this might then be owned by root and not the standard user which can result in a plethora of new problems arising when you're trying to do anything with those files.



UPDATE: oh seems you fixed it. Weird that is suddenly found mkyaffs2image when java was installed correctly. Still keep that sudo thing in mind. Trust me that stuff can really come back to bite you.
« Last Edit: September 11, 2017, 07:52:19 am by CommanderKitler »

PsyOps (OP)

  • *
  • Posts: 414
    • Section Eight
Re: Skelton - Help me compile a new Legacy possibility?
« Reply #107 on: September 11, 2017, 09:01:10 am »
ok thnx a bunch. Im guessing sudo was also working better for the broken build because of java somehow. I built the FW and its bricking the gpd. Ill retry without sudo and see if that helps. If not I have reinstalled all this stuff enough to know the proper files to get now. The only problem would have to be the looooong downloads. Maybe I will backup the downloads and reinstall everything again. I just hope anything I did to troubleshoot it didn't mess anything up.

I will probably move onto cwm and try to compile it.

PsyOps (OP)

  • *
  • Posts: 414
    • Section Eight
Re: Skelton - Help me compile a new Legacy possibility?
« Reply #108 on: September 11, 2017, 09:18:39 am »
Quote
UPDATE: oh seems you fixed it. Weird that is suddenly found mkyaffs2image when java was installed correctly. Still keep that sudo thing in mind. Trust me that stuff can really come back to bite you.

I am guessing the java commands created the needed files since they are all located inside /out directory.

PsyOps (OP)

  • *
  • Posts: 414
    • Section Eight
Re: Skelton - Help me compile a new Legacy possibility?
« Reply #109 on: September 13, 2017, 11:07:32 pm »
How exactly do i setup the device and vendor tree? Do I get that from the firefly FW or can I get it from stock FW image?

skelton

  • *****
  • Posts: 6372
Re: Skelton - Help me compile a new Legacy possibility?
« Reply #110 on: September 14, 2017, 09:45:08 am »
You mean to compile a cwm? Must be created manually. I personally never did It and crewrktablets don't share their own i think, so not sure. Anyway, if you have crewrktablets cwm working ibdon't ser why you want to make another one.
Retired

PsyOps (OP)

  • *
  • Posts: 414
    • Section Eight
Re: Skelton - Help me compile a new Legacy possibility?
« Reply #111 on: September 14, 2017, 01:20:39 pm »
There are many reasons why I should not compile a new version of cwm or twrp. There is only one real reason to do it. To open up functions like touch and to be able to work inside the android OS without having to boot to recovery each time. Now, personally I have no need for these functions and I know my way around recoveries enough to do what I want or need. This is to simplify the functions and to open it up to less experienced users.

I may not know how to compile it but I am trying. CWM's team, Crewtablets, and TeamWin are always spread thin and do not have time to focus their time and energy into every device, especially when it is a less known or popular model/manufacturer. What they do is make it open source so anyone can pick it up and adapt it to their device.

So I will probably fail and nothing may come from this, but I am trying.

Few more questions if you don't mind.

A smaller benefit would also be landscape orientation. How many GPD models you work on that have the rk3288 chipset? Compiling a new recovery would open it up for each device with same chipset wouldn't it?

I managed to compile all files for the rockchip firmware but it did not flash properly. It bricked the gpd to where it just showed the green light on power and nothing loaded. I did not modify it in any way, is there some steps I missed or should have done to get it to work properly?

When you compiled kernel and the system.img, was there any reason it was in ext3 format? I think you are right and that is the conflict right there. TWRP does not like it for some reason. I suppose I am getting ahead of myself. I need to compile a working versions of rockchip firmware first hehe.

Answer at your own leisure, again I appreciate the help.

skelton

  • *****
  • Posts: 6372
Re: Skelton - Help me compile a new Legacy possibility?
« Reply #112 on: September 14, 2017, 01:44:33 pm »
I have only work for gpd xd and q9. Both with rk3288 chipset. They have different partition layouts though. Xd uses unified storage and q9 doesn't. Screen resolution is different Too. No idea about cwm with touch controls.

System.img is created in ext4, it's transformed to ext3 after using rk3xxx tools to add a couple of things. It's a rk3xxx tools issue. If you use it It will be transformed to ext3.
About system.img generated by firefly, you need to add things from stock firmware, like framework files and systemui.apk, and also gamepad.apk and the files under system/usr/keylayout. With that It should work. You may also need to modify build.prop to spoof yo Nexus if you want. And edit a couple of more files to get init.d support. Also,, adding the root files, the supersu.apk etc...The Firefly creates a just a base system.img to begin with. If you don't want to complicate things, just take my system.img or a stock one and modify at your own.
About cwm, the problem is that rockchip doesn't use android partition standard, so i suppose must be modified heavily, so not sure if rom.manager or apps like that Will behave well with It. But i haven't used twrp or cwm Too much . I only use twrp un my phone, but i must enter recovery using a button combo ir a reboot APK that allow to reboot to recovery.
Sorry i am.not Too specific, but i madre those ROMs more than a year ahí and after múltiple bricked, etc , so i cannot remember everything to make a step by step guide.
« Last Edit: September 14, 2017, 01:46:44 pm by skelton »
Retired

PsyOps (OP)

  • *
  • Posts: 414
    • Section Eight
Re: Skelton - Help me compile a new Legacy possibility?
« Reply #113 on: September 14, 2017, 01:52:30 pm »
Thnx I will start reading up on your reply try to understand it better.

Quote
I only use twrp un my phone, but i must enter recovery using a button combo ir a reboot APK that allow to reboot to recovery.
You should install twrp manager. It will give you an idea of why I am trying so hard on this hehe. https://play.google.com/store/apps/details?id=com.jmz.soft.twrpmanager&hl=en

All it is basically is twrp functions inside the OS. I mean it reboots and runs a script to do it in recovery, but it will auto reboot so it is all seamless. From OS to recovery and back to OS.

PsyOps (OP)

  • *
  • Posts: 414
    • Section Eight
Re: Skelton - Help me compile a new Legacy possibility?
« Reply #114 on: September 14, 2017, 02:08:58 pm »
Forgive my ignorance, but is there any way to add your kernel and your modifications(mali drivers and stuff) to stock firmware without using the rockchip sdk or firmware?

skelton

  • *****
  • Posts: 6372
Re: Skelton - Help me compile a new Legacy possibility?
« Reply #115 on: September 14, 2017, 03:25:07 pm »
Just extract stock rom and use my boot.img, kernel.img and resource.img and repack. You will have a stock rom with my kernel.
Mali drivers are in system, so if you use a stock rom until 3.4.2 should be ok.

About twrp mánager, It doesn't work with my phone, probably because the twrp for my phone is unofficial, it's a chinese phone. But i just use an app to reboot a recovery. I only use twrp if I need to change firmware, which i don't do too much in phones
.
« Last Edit: September 14, 2017, 03:29:44 pm by skelton »
Retired

PsyOps (OP)

  • *
  • Posts: 414
    • Section Eight
Re: Skelton - Help me compile a new Legacy possibility?
« Reply #116 on: September 14, 2017, 03:41:13 pm »
Quote
I only use twrp if I need to change firmware, which i don't do too much in phones

yeh same here. I do the occasional backup too.

PsyOps (OP)

  • *
  • Posts: 414
    • Section Eight
Re: Skelton - Help me compile a new Legacy possibility?
« Reply #117 on: September 14, 2017, 11:25:32 pm »
Looks like twrp has an option that maybe wasnt set with the crewtablets.

Code: [Select]
# Adds EXT4 formatting binaries
TARGET_USERIMAGES_USE_EXT4 := true

We will have to see. If i can get it compiled hehe.

PsyOps (OP)

  • *
  • Posts: 414
    • Section Eight
Re: Skelton - Help me compile a new Legacy possibility?
« Reply #118 on: September 15, 2017, 08:59:23 am »
Can you take a guess at what is going wrong here? I know you havent compiled twrp or cwm, but do you have any guesses?

Pastebin

skelton

  • *****
  • Posts: 6372
Re: Skelton - Help me compile a new Legacy possibility?
« Reply #119 on: September 15, 2017, 09:52:21 am »
It seems there are some missing files. Also, you are using android 6 to compile It? As far as i know for android 4.4. you need to Download cwm ir omni rom source for android 4.4, not for android m.
Retired

 

Post a new topic