mirror of https://github.com/parazyd/arm-sdk.git
making way for other distros
This commit is contained in:
parent
5148007030
commit
7d91fab5a0
|
|
@ -41,13 +41,16 @@ then step inside the sdk, "source" it:
|
|||
; source sdk
|
||||
```
|
||||
|
||||
Now is the time you choose the device you want to build the image for. Currently
|
||||
you can choose one of the following:
|
||||
Now is the time you choose the device and OS you want to build the image for. Currently
|
||||
you can choose these distros:
|
||||
* `devuan`
|
||||
and one of the following devices:
|
||||
* `raspi2`
|
||||
* `bananapi`
|
||||
* `cubieboard2`
|
||||
* `chromeacer`
|
||||
```
|
||||
; init-arm raspi2
|
||||
; init devuan raspi2
|
||||
```
|
||||
|
||||
Once initialized, you will get further instructions.
|
||||
|
|
|
|||
13
arm/init-arm
13
arm/init-arm
|
|
@ -19,12 +19,13 @@
|
|||
# 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
|
||||
init-arm() {
|
||||
fn init-arm $*
|
||||
armdev="$1"
|
||||
req=(armdev)
|
||||
init() {
|
||||
fn init $*
|
||||
distro="$1"
|
||||
armdev="$2"
|
||||
req=(distro armdev)
|
||||
ckreq || {
|
||||
error "No ARM device specified"
|
||||
error "No distro or device specified"
|
||||
return 1
|
||||
}
|
||||
|
||||
|
|
@ -38,6 +39,6 @@ init-arm() {
|
|||
|
||||
arm_build_device=${arm_map[$armdev]}
|
||||
|
||||
common="$R/arm/common"
|
||||
common="$R/arm/profiles/common-${distro}"
|
||||
source ${arm_build_device}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,9 +20,25 @@
|
|||
#
|
||||
# Common functions for builds
|
||||
|
||||
# -- settings --
|
||||
os=devuan
|
||||
release=jessie
|
||||
section=main
|
||||
version=alpha4
|
||||
mirror=http://packages.devuan.org/merged
|
||||
|
||||
core_packages=(debian-keyring devuan-keyring)
|
||||
core_packages+=(git-core binutils ca-certificates initramfs-tools u-boot-tools)
|
||||
core_packages+=(locales console-common less nano git curl)
|
||||
|
||||
base_packages=(bzip2 dialog apt-utils fakeroot e2fsprogs parted)
|
||||
|
||||
system_packages=(sysvinit ssh)
|
||||
|
||||
writebase="$strapdir"
|
||||
command -v dcfldd >/dev/null && DD=`command -v dcfldd`
|
||||
DD=${DD:-/bin/dd}
|
||||
# -- end settings --
|
||||
|
||||
write-hostname() {
|
||||
fn write-hostname
|
||||
|
|
@ -344,12 +360,16 @@ ${device_name}-pack-image() {
|
|||
}
|
||||
|
||||
get-kernel-firmware() {
|
||||
fn get-kernel-firmware
|
||||
|
||||
[[ -d $R/tmp/firmware ]] || git clone \
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git $R/tmp/firmware
|
||||
rm -rf $R/tmp/firmware/.git
|
||||
}
|
||||
|
||||
clean-kernel-leftovers() {
|
||||
fn clean-kernel-leftovers
|
||||
|
||||
notice "Cleaning up from kernel build..."
|
||||
sudo rm -r ${strapdir}/usr/src/kernel
|
||||
sudo rm ${strapdir}/usr/src/${device_name}.config
|
||||
|
|
@ -363,8 +383,9 @@ clean-kernel-leftovers() {
|
|||
}
|
||||
|
||||
copy-kernel-config() {
|
||||
cd ${strapdir}/usr/src/kernel
|
||||
fn copy-kernel-config
|
||||
|
||||
cd ${strapdir}/usr/src/kernel
|
||||
cp -v ${workdir}/../kernel-configs/${device_name}.config .config
|
||||
sudo cp -v ${workdir}/../kernel-configs/${device_name}.config ../${device_name}.config
|
||||
|
||||
|
|
@ -373,6 +394,7 @@ copy-kernel-config() {
|
|||
}
|
||||
|
||||
make-kernel-modules() {
|
||||
fn make-kernel-modules
|
||||
[[ -d ${strapdir}/lib/modules ]] || sudo mkdir -p ${strapdir}/lib/modules
|
||||
[[ -d ${strapdir}/lib/firmware ]] || sudo mkdir -p ${strapdir}/lib/firmware
|
||||
sudo chown -R $USER ${strapdir}/lib/modules
|
||||
|
|
@ -385,6 +407,7 @@ make-kernel-modules() {
|
|||
}
|
||||
|
||||
copy-zram() {
|
||||
fn copy-zram
|
||||
notice "Installing zram init"
|
||||
sudo cp ${workdir}/../extra/zram ${strapdir}/etc/init.d/zram
|
||||
sudo chmod +x ${strapdir}/etc/init.d/zram
|
||||
|
|
@ -29,8 +29,6 @@ extra_packages=()
|
|||
# Ones below should not need changing
|
||||
workdir="$R/arm/${device_name}-build"
|
||||
strapdir="${workdir}/${os}-${arch}"
|
||||
qemu_bin="/usr/bin/qemu-arm-static" # Devuan
|
||||
#qemu_bin="/usr/bin/qemu-arm" # Gentoo
|
||||
parted_boot=(fat32 2048s 264191s)
|
||||
parted_root=(ext4 264192s 100%)
|
||||
inittab="T1:12345:respawn:/sbin/agetty -L ttyS0 115200 vt100"
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@ extra_packages+=(laptop-mode-tools usbutils sudo vim)
|
|||
# Ones below should not need changing
|
||||
workdir="$R/arm/${device_name}-build"
|
||||
strapdir="${workdir}/${os}-${arch}"
|
||||
qemu_bin="/usr/bin/qemu-arm-static" # Devuan
|
||||
#qemu_bin="/usr/bin/qemu-arm" # Gentoo
|
||||
gpt=1
|
||||
#parted_boot=(fat32 2048s 264191s)
|
||||
#parted_root=(ext4 264192s 100%)
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@ extra_packages=()
|
|||
# Ones below should not need changing
|
||||
workdir="$R/arm/${device_name}-build"
|
||||
strapdir="${workdir}/${os}-${arch}"
|
||||
qemu_bin="/usr/bin/qemu-arm-static" # Devuan
|
||||
#qemu_bin="/usr/bin/qemu-arm" # Gentoo
|
||||
parted_boot=(fat32 2048s 264191s)
|
||||
parted_root=(ext4 264192s 100%)
|
||||
inittab="T1:12345:respawn:/sbin/agetty -L ttyS0 115200 vt100"
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@ extra_packages=(wpasupplicant ntpdate)
|
|||
# Ones below should not need changing
|
||||
workdir="$R/arm/${armdev}-build"
|
||||
strapdir="${workdir}/${os}-${arch}"
|
||||
qemu_bin="/usr/bin/qemu-arm-static" # Devuan, install qemu-user-static
|
||||
#qemu_bin="/usr/bin/qemu-arm" # Gentoo, compile with USE=static-user
|
||||
#enable_qemu_wrapper=1 # Uncomment this to enable qemu-wrapper (consult the readme)
|
||||
parted_boot=(fat32 0 64)
|
||||
parted_root=(ext4 64 -1)
|
||||
|
|
|
|||
20
config
20
config
|
|
@ -2,16 +2,7 @@
|
|||
|
||||
# ARM SDK configuration
|
||||
# safe to leave untouched
|
||||
|
||||
# syntax: variable=value
|
||||
# (no spaces before and after the equal sign)
|
||||
|
||||
os=devuan
|
||||
release=jessie
|
||||
section=main
|
||||
version=alpha4
|
||||
mirror=http://packages.devuan.org/merged
|
||||
|
||||
#
|
||||
# add here the info of the toolchain you are using
|
||||
# custom toolchain
|
||||
compiler="arm-linux-gnueabihf-"
|
||||
|
|
@ -20,10 +11,5 @@ export PATH="$PATH:/sbin:$R/toolchains/gcc-arm-linux-gnueabihf-4.7/bin"
|
|||
#compiler="arm-none-eabi-"
|
||||
#export PATH="$PATH:/sbin"
|
||||
|
||||
core_packages=(debian-keyring devuan-keyring)
|
||||
core_packages+=(git-core binutils ca-certificates initramfs-tools u-boot-tools)
|
||||
core_packages+=(locales console-common less nano git curl)
|
||||
|
||||
base_packages=(bzip2 dialog apt-utils fakeroot e2fsprogs parted)
|
||||
|
||||
system_packages=(sysvinit ssh)
|
||||
qemu_bin="/usr/bin/qemu-arm-static" # Devuan
|
||||
#qemu_bin="/usr/bin/qemu-arm" # Gentoo
|
||||
|
|
|
|||
Loading…
Reference in New Issue