aarch64-laptops / build

Build an Linux OS based image
234 stars 55 forks source link

Condition for packaging up kernel, grub and dts for delivery into virtual machine is always false #14

Closed RussianNeuroMancer closed 5 years ago

RussianNeuroMancer commented 5 years ago

Hello!

Currently scripts/make-image.sh --setup-vm always fail for me with /patch/to/build/output/grub-linux-dtb.tgz: No such file or directory error, while all necessary files and folder is present in output (grub folder, three kernel deb packages and dts files).

If I didn't miss anything it's seems like this condition is always false for two reasons:

  1. "[ -d grub ]" is false because current directory in this part of the script is $PWD instead of $OUTDIR
  2. Even if current directory would be $OUTDIR instead of $PWD [ -f linux-*.deb ] and [ laptop*.dtb ] will always throw [: too many arguments error because there is more than one deb and more than one dts in $OUTDIR

As for item 2 I guess something like this should work:

if [ -d grub ] && [ "$(ls | grep 'linux-.*.deb' )" ] && [ "$(ls | grep 'laptop.*.dtb' )" ]; then

lag-linaro commented 5 years ago

It looks like you have uncovered an evolutionary bug.

If you take a look at scripts/setup-vm.sh you will see that since commit 58e134666159 ("Use PPAs for Grub and Kernel") applied in March, we haven't used locally built kernels for the pre-builts.

It's also evident that the latest pre-built images have only been based on pre-built clean images, rather than from scratch.

Can I ask though, what is it you're trying to accomplish, specifically?

RussianNeuroMancer commented 5 years ago

Can I ask though, what is it you're trying to accomplish, specifically?

I tried to build disco with vanilla Gnome Shell instead of Ubuntu desktop (vanilla-gnome-desktop and vanilla-gnome-default-settings packages instead of ubuntu-desktop package) by following four steps described in Option 3. After editing script and renaming dtb in result image this works out - image boot and works. By the way, thank you for your hard work :)

lag-linaro commented 5 years ago

This issue has been fixed in this commit: https://github.com/aarch64-laptops/build/commit/c580bc82674abf94abcbad7d8a48b7d91c2a238d

To fix the laptops.dtb situation, it's probably easier is if you just run ./quick-start.sh <MODEL>.

I will reply with more information in your other bug report: #10

RussianNeuroMancer commented 5 years ago

This issue has been fixed in this commit: c580bc8

Thank you!