forked from buildroot/buildroot
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A script to build a gcw0 sdcard image
* od_gcw0_defconfig adjusted to build the linux kernel. * Kernel modules squashfs built as a post-image step. * Adds ubiboot boot package. * Adds od-imager host package. Signed-off-by: Gleb Mazovetskiy <glex.spb@gmail.com>
- Loading branch information
Showing
6 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
# Build modules.squashfs | ||
if [ -f output/build/linux-custom/create_modules_fs.sh ]; then | ||
output/build/linux-custom/create_modules_fs.sh | ||
cp output/build/linux-custom/modules.squashfs "$1" | ||
else | ||
echo 'modules.squashfs not built because create_modules_fs.sh is missing' | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
mkdir -p dl/od_local_pack_gcw0/ | ||
cd dl/od_local_pack_gcw0/ | ||
|
||
echo Downloading rs97.bitgala.xyz/RG-350/localpack/emulators/... | ||
wget -N -r -nd --no-parent --reject='index.html*' --reject='scumm*' --reject='robots.txt*' \ | ||
https://rs97.bitgala.xyz/RG-350/localpack/default_emulators/ |& tee /tmp/emulators.log | ||
|
||
echo Downloading rs97.bitgala.xyz/RG-350/localpack/apps/... | ||
wget -N -r -nd --no-parent --reject='index.html*' --reject='robots.txt*' \ | ||
https://rs97.bitgala.xyz/RG-350/localpack/default_apps/ |& tee /tmp/apps.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/sh | ||
|
||
# Builds a full SD card image | ||
# | ||
# If you want the localpack apps included in the image, run this first: | ||
# board/opendingux/gcw0/download_local_pack.sh | ||
|
||
set -e | ||
|
||
make world mininit ubiboot host-od-imager | ||
|
||
# Data image (OPKs): | ||
cd output/images | ||
mkdir -p od-imager/apps/ | ||
rm -f od-imager/apps/* | ||
if [ -d ../../dl/od_local_pack_gcw0/ ]; then | ||
cp ../../dl/od_local_pack_gcw0/*.opk od-imager/apps/ | ||
fi | ||
if [ -d opks ]; then | ||
cp opks/*.opk od-imager/apps/ | ||
fi | ||
|
||
# System image | ||
cp mininit-syspart od-imager/ | ||
cat vmlinuz.bin gcw0.dtb > od-imager/vmlinuz.bin | ||
cp modules.squashfs od-imager/ | ||
cp rootfs.squashfs od-imager/ | ||
# Fallbacks are empty as this is the initial image. | ||
echo -n > od-imager/vmlinuz.bak | ||
echo -n > od-imager/modules.squashfs.bak | ||
|
||
# Bootloader | ||
cp ubiboot/ubiboot-v20_mddr_512mb.bin od-imager/ubiboot.bin | ||
cd - | ||
|
||
# Assemble partitions and the final image | ||
cd output/images/od-imager/ | ||
./create_mbr.sh | ||
./create_system_image.sh | ||
./create_data_image.sh | ||
./assemble_images.sh | ||
cd - | ||
|
||
echo | ||
echo 'SD card image created in:' | ||
echo output/images/od-imager/images/sd_image.bin | ||
echo Size: | ||
du -sh output/images/od-imager/images/sd_image.bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sha256 9e2022812c2faf13d9cc71ea517af393ae8539770957e0de3921c50ebef880ef od-imager-8d01931.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
############################################################# | ||
# | ||
# od-imager | ||
# | ||
############################################################# | ||
|
||
OD_IMAGER_VERSION = 8d01931 | ||
OD_IMAGER_SITE = $(call github,glebm,imager,$(OD_IMAGER_VERSION)) | ||
|
||
define HOST_OD_IMAGER_INSTALL_CMDS | ||
mkdir -p $(BINARIES_DIR)/od-imager | ||
cp $(@D)/*.* $(BINARIES_DIR)/od-imager | ||
endef | ||
|
||
$(eval $(host-generic-package)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters