Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create droid4 kernel repo and ddroid.zip generation #49

Closed
MerlijnWajer opened this issue Feb 1, 2018 · 12 comments
Assignees

Comments

@MerlijnWajer
Copy link
Member

@MerlijnWajer MerlijnWajer commented Feb 1, 2018

We need to find the most recent droid4 patches and apply them on top of mainline, and push that to a repo to facilitate (semi-)auto building

@MerlijnWajer

This comment has been minimized.

Copy link
Member Author

@MerlijnWajer MerlijnWajer commented Feb 1, 2018

With this kernel and dts we can then proceed to create a ddroid.zip that can be loaded with Safestrap.

@dderby

This comment has been minimized.

Copy link
Member

@dderby dderby commented Feb 6, 2018

For my multi-device DebiaN900 successor, I wrote a simple script which does the following:

  • Downloads the ddroid4-mainline-kexec-0.3.xz and extracts it
  • Clones Tony's ddroid Git repo
  • Copies the kernel modules and kexec binary across from the extracted zip
  • Copies the zImage and dtb from a pre-built kernel tree
  • Builds a ddroid zip file that can be loaded with SafeStrap

I can give this to you but I'll need to have a look at your build infrastructure to see how to integrate this. Since I wrote that, Tony made a new droid4-mainline-kexec-0.4.xz. I think I will need to modify my script for this version as I remember having a problem with it.

I don't know if you are aware but there are now also utagboot and kexecboot as alternative methods for booting.

@MerlijnWajer

This comment has been minimized.

Copy link
Member Author

@MerlijnWajer MerlijnWajer commented Feb 6, 2018

@parazyd - can you comment on the build infrastructure part?

utagboot and kexecboot both seem like decent options as well, I was not aware of them. Any suggestions for a specific one, @dderby ?

Thanks!

@dderby

This comment has been minimized.

Copy link
Member

@dderby dderby commented Feb 6, 2018

I think we should just start off with one of them so we can get a Droid 4 image out. Let's continue with SafeStrap for now as we're both familiar with it and we can see if it's worthwhile using one of the alternatives later.

@dderby

This comment has been minimized.

Copy link
Member

@dderby dderby commented Feb 6, 2018

This is basically it. We can integrate it once we've got a Droid 4 kernel building.

#!/bin/sh

# Configure ddroid
#
# Configure an Android "ROM" with modified kexec that can be used to boot mainline Linux
# Distributable under the terms of the GNU GPL version 3.

set -e
set -u

KEXECBINARIES=droid4-mainline-kexec-0.3
KERNELPATH=../..

wget http://muru.com/linux/d4/d$KEXECBINARIES.tar.xz -O $KEXECBINARIES.tar.xz

xzcat $KEXECBINARIES.tar.xz | tar xf -

git clone --depth 1 https://github.com/tmlind/ddroid.git

cp $KEXECBINARIES/uart.ko ddroid/system/etc/kexec
cp $KEXECBINARIES/arm_kexec.ko ddroid/system/etc/kexec
cp $KEXECBINARIES/kexec.ko ddroid/system/etc/kexec
cp $KEXECBINARIES/kexec ddroid/system/etc/kexec/kexec.static

cp $KERNELPATH/linux/arch/arm/boot/zImage ddroid/system/etc/kexec/kernel
cp $KERNELPATH/linux/arch/arm/boot/dts/omap4-droid4-xt894.dtb ddroid/system/etc/kexec/devtree

# Insert code here to copy initramfs if using one

cd ddroid

make zip
@parazyd

This comment has been minimized.

Copy link
Member

@parazyd parazyd commented Feb 9, 2018

@MerlijnWajer will these patches for Linux be enough or do we need to use anything else? https://github.com/parazyd/arm-sdk/tree/master/extra/patches/linux-droid4-patches

@MerlijnWajer

This comment has been minimized.

Copy link
Member Author

@MerlijnWajer MerlijnWajer commented Feb 9, 2018

Let's try it with these, and as soon as 4.16-rc1 comes out, use the patches provided by sre. (He said he would post new ones when 4.16-rc1 comes out)

@dderby

This comment has been minimized.

Copy link
Member

@dderby dderby commented Feb 9, 2018

Sebastian already posted new ones:
https://www.spinics.net/lists/linux-omap/msg141500.html

@dderby

This comment has been minimized.

Copy link
Member

@dderby dderby commented Feb 12, 2018

There's another new patch for the touchscreen:
https://www.spinics.net/lists/linux-omap/msg141540.html

@MerlijnWajer

This comment has been minimized.

Copy link
Member Author

@MerlijnWajer MerlijnWajer commented Feb 14, 2018

@MerlijnWajer

This comment has been minimized.

Copy link
Member Author

@MerlijnWajer MerlijnWajer commented Feb 16, 2018

Latest image + ddroid works for me.

Two things I noticed:

  • I need to hold enter on serial for a while, otherwise booting just hangs (hangs because it can no longer write output?)
  • Networking is configured for eth0, should be for wlan0.

I think we can can close this soon - but let's file an issue for the above if it happens to others too.

@dderby - can you verify the serial point?

@dderby

This comment has been minimized.

Copy link
Member

@dderby dderby commented Feb 16, 2018

As I mentioned on IRC, I can boot to Hildon without needing to hold down Enter nor needing to have the serial cable connected.

ifconfig shows wlan0 (as down) and it doesn't find eth0.

I haven't done anything peculiar with my set up. The only thing I changed was the root device in the kernel cmdline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.