Beginning of support for odroid c2
This commit is contained in:
parent
7cbb3242bf
commit
33e6f2c2be
|
@ -51,7 +51,7 @@ To build a 64bit Qemu image:
|
|||
|
||||
freedombone-image -t qemu-x86_64 -s 8G
|
||||
|
||||
Other supported boards are cubieboard2, cubietruck, olinuxino-lime, olinuxino-lime2 and olinuxino-micro.
|
||||
Other supported boards are cubieboard2, cubietruck, olinuxino-lime, olinuxino-lime2, olinuxino-micro and odroid-c2.
|
||||
|
||||
If the image build fails with an error such as "/Error reading from server. Remote end closed connection/" then you can specify a debian package mirror repository manually with:
|
||||
|
||||
|
|
Binary file not shown.
|
@ -133,6 +133,55 @@ beaglebone_repack_kernel() {
|
|||
-d $initRd uInitrd )
|
||||
}
|
||||
|
||||
odroidc2_setup_boot() {
|
||||
dtb="$1"
|
||||
|
||||
# Setup uEnv.txt
|
||||
if grep -q btrfs /etc/fstab ; then
|
||||
fstype=btrfs
|
||||
else
|
||||
fstype=ext4
|
||||
fi
|
||||
kernelVersion=$(ls /usr/lib/*/${dtb}.dtb | head -1 | cut -d/ -f4)
|
||||
version=$(echo $kernelVersion | sed 's/linux-image-\(.*\)/\1/')
|
||||
initRd=initrd.img-$version
|
||||
vmlinuz=vmlinuz-$version
|
||||
|
||||
# based on http://odroid.com/dokuwiki/doku.php?id=en:c2_building_u-boot
|
||||
cat >> /boot/uEnv.txt <<EOF
|
||||
mmcroot=/dev/mmcblk0p2 ro
|
||||
mmcrootfstype=$fstype rootwait fixrtc
|
||||
mmcrootflags=subvol=@
|
||||
|
||||
console=ttyO0,115200n8
|
||||
|
||||
kernel_file=$vmlinuz
|
||||
initrd_file=$initRd
|
||||
|
||||
loadaddr=0x11000000
|
||||
initrd_addr=0x13000000
|
||||
fdtaddr=0x1000000
|
||||
|
||||
initrd_high=0xffffffff
|
||||
fdt_high=0xffffffff
|
||||
|
||||
loadkernel=load mmc \${mmcdev}:\${mmcpart} \${loadaddr} \${kernel_file}
|
||||
loadinitrd=load mmc \${mmcdev}:\${mmcpart} \${initrd_addr} \${initrd_file}; setenv initrd_size \${filesize}
|
||||
loadfdt=load mmc \${mmcdev}:\${mmcpart} \${fdtaddr} /dtbs/\${fdtfile}
|
||||
|
||||
m="1080p60hz"
|
||||
m_bpp="32"
|
||||
|
||||
loadfiles=run loadkernel; run loadinitrd; run loadfdt
|
||||
mmcargs=setenv bootargs rootwait rw console=tty0 console=\${console} root=\${mmcroot} rootfstype=\${mmcrootfstype} rootflags=\${mmcrootflags} no_console_suspend hdmimode=${m} m_bpp=${m_bpp} fsck.fix=yes
|
||||
|
||||
uenvcmd=run loadfiles; run mmcargs; booti \${loadaddr} \${initrd_addr}:\${initrd_size} \${fdtaddr}
|
||||
EOF
|
||||
|
||||
mkdir -p /boot/dtbs
|
||||
cp /usr/lib/linux-image-*-armmp/* /boot/dtbs
|
||||
}
|
||||
|
||||
a20_setup_boot() {
|
||||
dtb="$1"
|
||||
|
||||
|
@ -197,6 +246,10 @@ case "$MACHINE" in
|
|||
beaglebone_repack_kernel
|
||||
enable_serial_console ttyO0
|
||||
;;
|
||||
odroid-c2)
|
||||
odroidc2_setup_boot meson64_odroidc2
|
||||
enable_serial_console ttyO0
|
||||
;;
|
||||
cubietruck)
|
||||
a20_setup_boot sun7i-a20-cubietruck.dtb
|
||||
enable_serial_console ttyS0
|
||||
|
|
|
@ -83,6 +83,9 @@ logrotate module-init-tools netbase rsyslog udev debian-archive-keyring"
|
|||
# Packages needed on the beaglebone
|
||||
beaglebone_pkgs="linux-image-armmp u-boot-tools u-boot"
|
||||
|
||||
# Packages needed on the Odroid C2 devices:
|
||||
odroidc2_pkgs="linux-image-armmp-lpae u-boot-tools u-boot"
|
||||
|
||||
# Packages needed on the Allwinner A20 devices:
|
||||
a20_pkgs="linux-image-armmp-lpae u-boot-tools u-boot u-boot-sunxi"
|
||||
|
||||
|
@ -103,6 +106,19 @@ case "$MACHINE" in
|
|||
--no-extlinux \
|
||||
--foreign /usr/bin/qemu-arm-static \
|
||||
--roottype btrfs \
|
||||
"
|
||||
;;
|
||||
odroid-c2)
|
||||
extra_pkgs="$odroidc2_pkgs"
|
||||
extra_opts="\
|
||||
--variant minbase \
|
||||
--bootoffset=2mib \
|
||||
--bootsize 128M \
|
||||
--boottype ext2 \
|
||||
--no-kernel \
|
||||
--no-extlinux \
|
||||
--foreign /usr/bin/qemu-arm-static \
|
||||
--roottype btrfs \
|
||||
"
|
||||
;;
|
||||
cubietruck | a20-olinuxino-lime | a20-olinuxino-lime2 | a20-olinuxino-micro | cubieboard2)
|
||||
|
|
|
@ -89,6 +89,17 @@ beaglebone: prep
|
|||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
|
||||
# build Odroid C2 SD card image
|
||||
odroid-c2: prep
|
||||
$(eval ARCHITECTURE = aarch64)
|
||||
$(eval MACHINE = odroid-c2)
|
||||
$(MAKE_IMAGE)
|
||||
@rm -f $(ARCHIVE)
|
||||
$(XZ) $(IMAGE)
|
||||
@echo ""
|
||||
$(SIGN)
|
||||
@echo "Build complete."
|
||||
|
||||
# build Cubieboard2 SD card image
|
||||
cubieboard2: prep
|
||||
$(eval ARCHITECTURE = armhf)
|
||||
|
|
Loading…
Reference in New Issue