orangepi-pc #3
Executable
BIN
Binary file not shown.
@@ -27,6 +27,8 @@ export UCLIBC_CONFIG_FILE=${root}/board/${BOARD_NAME}/uclibc-1.0.50.config
|
||||
export KERNEL_VERSION=6.13.3
|
||||
export KERNEL_CONFIG_FILE=${root}/board/${BOARD_NAME}/linux-${KERNEL_VERSION}.config
|
||||
|
||||
export UBOOT_DEFCONFIG=orangepi_pc_defconfig
|
||||
|
||||
export ZLIB_ENABLE=y
|
||||
export DROPBEAR_ENABLE=y
|
||||
export IMAGE_USABLE_ENABLE=y
|
||||
|
||||
@@ -27,6 +27,8 @@ export UCLIBC_CONFIG_FILE=$root/board/${BOARD_NAME}/uclibc-1.0.50.config
|
||||
export KERNEL_VERSION=6.8.6
|
||||
export KERNEL_CONFIG_FILE=${root}/board/${BOARD_NAME}/linux-${KERNEL_VERSION}.config
|
||||
|
||||
export UBOOT_DEFCONFIG=orangepi_zero2w_defconfig
|
||||
|
||||
export ZLIB_ENABLE=y
|
||||
export DROPBEAR_ENABLE=y
|
||||
export IMAGE_USABLE_ENABLE=y
|
||||
@@ -43,5 +45,5 @@ export HOSTAPD_ENABLE=y
|
||||
export OPENSSL_ENABLE=y
|
||||
export DNSMASQ_ENABLE=y
|
||||
export IPTABLES_ENABLE=y
|
||||
export KO8821AU_ENABLE=y
|
||||
export KO8821AU_ENABLE=n
|
||||
#--------------------------------------
|
||||
|
||||
+3
-1
@@ -27,6 +27,8 @@ export UCLIBC_CONFIG_FILE=$root/board/${BOARD_NAME}/uclibc-1.0.50.config
|
||||
export KERNEL_VERSION=6.8.6
|
||||
export KERNEL_CONFIG_FILE=${root}/board/${BOARD_NAME}/linux-${KERNEL_VERSION}.config
|
||||
|
||||
export UBOOT_DEFCONFIG=orangepi_zero2w_defconfig
|
||||
|
||||
export ZLIB_ENABLE=y
|
||||
export DROPBEAR_ENABLE=y
|
||||
export IMAGE_USABLE_ENABLE=y
|
||||
@@ -43,5 +45,5 @@ export HOSTAPD_ENABLE=y
|
||||
export OPENSSL_ENABLE=y
|
||||
export DNSMASQ_ENABLE=y
|
||||
export IPTABLES_ENABLE=y
|
||||
export KO8821AU_ENABLE=y
|
||||
export KO8821AU_ENABLE=n
|
||||
#--------------------------------------
|
||||
|
||||
+6
-2
@@ -22,7 +22,9 @@ kernel() {
|
||||
printf "$UGREEN** Building Linux Kernel\n$RESET"
|
||||
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- $makeflags # &>> $fulllogfile
|
||||
check $? "Build Linux Kernel"
|
||||
ls -lh arch/$ARCH/boot/zImage
|
||||
KIMAGE=zImage
|
||||
[ "$ARCH" = "arm64" ] && KIMAGE=Image
|
||||
ls -lh arch/$ARCH/boot/$KIMAGE
|
||||
} # kernel
|
||||
#-----------------------------------------------------------
|
||||
|
||||
@@ -54,7 +56,9 @@ kernel_with_rootfs() {
|
||||
printf "$UGREEN** Installing Linux Kernel into images path\n$RESET"
|
||||
# make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE INSTALL_MOD_PATH=$rootfspath modules_install # &>> $fulllogfile
|
||||
# rm -v $rootfspath/usr/lib/modules/6.1.91/{source,build}
|
||||
cp -v arch/$ARCH/boot/zImage $sdroot/boot
|
||||
KIMAGE=zImage
|
||||
[ "$ARCH" = "arm64" ] && KIMAGE=Image
|
||||
cp -v arch/$ARCH/boot/$KIMAGE $sdroot/boot
|
||||
check $? "Install Linux Kernel into images path"
|
||||
}
|
||||
#-----------------------------------------------------------
|
||||
|
||||
+5
-1
@@ -20,6 +20,7 @@ sdroot() {
|
||||
printf "$GREEN** Copy extlinux.conf\n$RESET"
|
||||
cp -v $root/extlinux/extlinux.conf $sdroot/boot/extlinux
|
||||
check $? "Copy extlinux.conf"
|
||||
[ "$ARCH" = "arm64" ] && sed -i "s/zImage/Image/g" $sdroot/boot/extlinux/extlinux.conf
|
||||
kernel_with_rootfs
|
||||
uboot
|
||||
printf "$GREEN** Creating rootfs.ext4\n$RESET"
|
||||
@@ -74,7 +75,9 @@ sdroot_usable() {
|
||||
|
||||
initramfs
|
||||
cp -v $build/initramfs.img $sdroot/boot
|
||||
cp -v $build/kernel/linux-6.13.3/arch/$ARCH/boot/zImage $sdroot/boot
|
||||
KIMAGE=zImage
|
||||
[ "$ARCH" = "arm64" ] && KIMAGE=Image
|
||||
cp -v $build/kernel/linux-6.13.3/arch/$ARCH/boot/$KIMAGE $sdroot/boot
|
||||
uboot
|
||||
printf "$GREEN** Creating rootfs.ext4\n$RESET"
|
||||
cd $out
|
||||
@@ -96,6 +99,7 @@ sdroot_usable() {
|
||||
check $? "Copy genimage.cfg"
|
||||
sed -i "s/FILEUUID/$uuid/g" genimage.cfg
|
||||
sed -i "s/ROOTUUID/$uuid/g" $sdroot/boot/extlinux/extlinux.conf
|
||||
[ "$ARCH" = "arm64" ] && sed -i "s/zImage/Image/g" $sdroot/boot/extlinux/extlinux.conf
|
||||
sed -i "s/sdcard.img/sdcard_usable.img/g" genimage.cfg
|
||||
mkdir -v rootmnt
|
||||
sudo mount -v rootfs.ext4 rootmnt
|
||||
|
||||
+11
-3
@@ -15,12 +15,20 @@ uboot() {
|
||||
check $? "Extract uboot"
|
||||
cd u-boot-$uboot_version
|
||||
# cp -rv $root/uclibc/config-1.0.50 .config
|
||||
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- orangepi_pc_defconfig
|
||||
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE- $UBOOT_DEFCONFIG
|
||||
check $? "Configure uboot"
|
||||
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE- $makeflags # &>> $fulllogfile
|
||||
if [ "$BOARD_NAME" = "orangepi_pc" ]; then
|
||||
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE- $makeflags # &>> $fulllogfile
|
||||
elif [ "$BOARD_NAME" = "orangepi_zero_2w" ]; then
|
||||
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE- BL31=$root/board/$BOARD_NAME/bl31.bin $makeflags
|
||||
fi
|
||||
check $? "Build uboot"
|
||||
cp -v u-boot-sunxi-with-spl.bin $out
|
||||
cp -v arch/arm/dts/sun8i-h3-orangepi-pc.dtb $sdroot/boot/dtbs
|
||||
if [ "$ARCH" = "arm" ]; then
|
||||
cp -v arch/arm/dts/sun8i-h3-orangepi-pc.dtb $sdroot/boot/dtbs
|
||||
elif [ "$ARCH" = "arm64" ]; then
|
||||
cp -v dts/upstream/src/arm64/allwinner/sun50i-h618-orangepi-zero2w.dtb $sdroot/boot/dtbs
|
||||
fi
|
||||
# make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE DESTDIR=$rootfspath install # &>> $fulllogfile
|
||||
check $? "Install uboot to out directory"
|
||||
check $? "Build and install uboot to out directory"
|
||||
|
||||
Reference in New Issue
Block a user