build uboot from source, pull blobs from upstream, use dtbs from archive #11

Merged
merged 3 commits into from Jul 27, 2017

Conversation

Projects
None yet
4 participants
Collaborator

ogra1 commented Jul 14, 2017

  • drop all prebuilt bits
  • build u-boot.bin from upstream source
  • pull binary blobs from broadcoms upstream "stable" branch
  • move config.txt and cmdline.txt to a configs subdir
  • move uboot.patch and uboot.env.in to toplevel dir
  • generate (and link) uboot.env during build
  • pull devicetree files from the kernel package in the ubuntu archive
  • update README

@zyga zyga self-requested a review Jul 14, 2017

two minor comments

snapcraft.yaml
+ mkdir -p $SNAPCRAFT_PART_INSTALL/boot-assets
+ cp u-boot.bin $SNAPCRAFT_PART_INSTALL/boot-assets/uboot.bin
+ tools/mkenvimage -r -s 131072 -o $SNAPCRAFT_PART_INSTALL/boot-assets/uboot.env ../../../uboot.env.in
+ cd $SNAPCRAFT_PART_INSTALL/boot-assets; ln -s uboot.env uboot.conf
@kubiko

kubiko Jul 17, 2017

This could be simplified to once call:
ln -s uboot.env $SNAPCRAFT_PART_INSTALL/boot-assets/uboot.conf

snapcraft.yaml
+ after:
+ - uboot
+ prepare: |
+ git clone --depth=1 https://github.com/raspberrypi/firmware.git -b stable
@kubiko

kubiko Jul 17, 2017

Don't you want to use tag instead of branch here, so we do not accidentally pick new version from upstream without prior testing?

@ogra1

ogra1 Jul 17, 2017

Collaborator

i'm not sure if --depth=1 works with tags, i have to try (the prob is without --depth=1 the checkkout takes between 30 and 45min because it pulls the whole history (vs a few seconds with --depth=1 )

kubiko approved these changes Jul 19, 2017

+1

@@ -29,8 +29,8 @@ parts:
install: |
mkdir -p $SNAPCRAFT_PART_INSTALL/boot-assets
cp u-boot.bin $SNAPCRAFT_PART_INSTALL/boot-assets/uboot.bin
- tools/mkenvimage -r -s 131072 -o $SNAPCRAFT_PART_INSTALL/boot-assets/uboot.env ../../../uboot.env.in
- ln -s uboot.env $SNAPCRAFT_PART_INSTALL/boot-assets/uboot.conf
+ tools/mkenvimage -r -s 131072 -o $SNAPCRAFT_PART_INSTALL/uboot.env ../../../uboot.env.in
@kubiko

kubiko Jul 19, 2017

yep, uboot.env should be in top level
+1

+ git apply ../../../uboot.patch
+ make rpi_3_32b_defconfig
+ build: |
+ if [ "$(arch)" = "x86_64" ]; then
@morphis

morphis Jul 27, 2017

Where does $arch come from?

@ogra1

ogra1 Jul 27, 2017

Collaborator

from coreutils (usually available on all build environments, but if you insist i can add it to build-packages as safety net)

note it is $(arch) ... i.e. the output of /usr/bin/arch ...

LGTM

@ogra1 ogra1 merged commit 6af80ef into snapcore:master Jul 27, 2017

@ogra1 ogra1 referenced this pull request Jul 27, 2017

Closed

Sync boot files from upstream #10

Collaborator

zyga commented Aug 1, 2017

Thanks for doing this @ogra1 -- I'm sorry to not have reviewed it earlier. Looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment