• Content Count

  • Joined

  • Last visited

About lrrr

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Which patches are you using to enable sf command for SPI? The mainline Allwinner A10 SPI driver does not work with sun8i. The only driver I've found to work is this older fork. fork: info: It's been awhile since I've used an official armbian image. IIRC besides kernel related files, it's just overlays, bootscripts, and dtbs. Also, a couple of armbian related files that need to be kept if you want the armbian OS scripts to work (armbian-config, etc).
  2. GPL guarantees the source code, which allows *you* to modify Armbian. If you want Synaptic as default, fork and modify source. Source code is available by clicking the downloads > source links on the menu. Have fun.
  3. lrrr

    Orange Pi R1

    Is there an "official" way to install openwrt to spiflash? About the only thing I've found for installing to spiflash, is this:
  4. For brief info on the services: head -n3 /lib/systemd/system/armbian* I've found them not to be necessary but YMMV. Have a look at the commented scripts in '/usr/lib/armbian' to see which services you might want (or need).
  5. There is no official sdcard image but the attached script will create a image for the OrangePi Zero/R1. It uses daily generated files from Debian daily-images and considered testing/unstable. SDcard image creation: You will need basic Linux/Debian and dosfs utils. No su/root needed. Run the script to generate sdcard image for writing to sdcard. Optionally, if you want ssh network-console access, add preseed.cfg to same directory as script. See attached preseed.cfg and example-preseed.txt . Basic installation: Once the installer is started, it runs completely in RAM and no longer needs files from the sdcard. You can delete all partitions on the sdcard and install Debian. Guided partitioning is recommended. When using ssh network-console installer, allow time for the installer to download files before logging in using ssh installer@IPAddress. Basic SDcard image script guide: Two parts are needed, the device-specific firmware.img.gz and partition.img.gz. Concatenate both to get full sdcard image. There is no firmware for the Zero/R1 but can easily be created by using gen-hd-image and extracted u-boot binary from deb file. For more info, see attached script and Notice: Posted for anyone interested in testing and experimental purposes. preseed.cfg Edit: To use buster u-boot version instead of stretch, edit script with: sed -i 's/^UBOOTDEB.*/UBOOTDEB="u-boot-sunxi_2018.05+dfsg-1_armhf.deb"/'
  6. Does dpkg-divert not work for some reason? dpkg-divert --add /etc/default/cpufrequtils
  7. I usually use the cached rootfs in cache/rootfs. Extract, then mount pseudo-filesystems and copy over static qemu like you posted. Quick hacks are good if they get the job done. Another easy way to get chroot with and do things manually: #!/bin/sh echo "Entering chroot for $1 $2 $3" bash Before you exit chroot, copy your debs/files with another shell, network, etc.
  8. Add your code to userpatches/ Also of interest is userpatches/lib.config. Should be info in the documentation.
  9. Used ext2fsd for years when I used to dual boot with Windows. Never encountered any problems. Tried it the other day before posting. No problems accessing the sdcard and adding my custom configuration to armbian_first_run.txt.
  10. It would be nice if the SDK could easily build deb packages, similar to openwrt's SDK. I checked into but didn't mess with distcc setup. Larger projects will need distcc or much patience. This is sort of what I do to "cross-compile" deb packages. You still need to build an image but you don't have to use it. You can just copy your deb packages over to target os. To get make install results into deb package, you need to use some sort of debian package builder. Many options, guides, and tutorials are available online. The example below uses dpkg-deb. After you build initial image, you can speed up image building by setting clean level: ./compile CLEAN_LEVEL="" Needs a small patch to SDK, as we need a way to get out the debs (or use another method, like network). diff --git a/lib/ b/lib/ index a99163e..bea81fc 100644 --- a/lib/ +++ b/lib/ @@ -110,7 +110,7 @@ customize_image() chmod +x $SDCARD/tmp/ mkdir -p $SDCARD/tmp/overlay # util-linux >= 2.27 required - mount -o bind,ro $SRC/userpatches/overlay $SDCARD/tmp/overlay + mount -o bind $SRC/userpatches/overlay $SDCARD/tmp/overlay display_alert "Calling image customization script" "" "info" chroot $SDCARD /bin/bash -c "/tmp/ $RELEASE $LINUXFAMILY $BOARD $BUILD_DESKTOP" umount $SDCARD/tmp/overlay In userpatches/, drop your compile code. Or for multiple packages, do something like: for FN in /tmp/overlay/packages/*; do source $FN done Add your compile script. Here is a hello world example, copy to userpatches/overlay/packages/helloworld: #!/bin/sh -e # example based on PACKAGE="helloworld" VERSION="1.0-1" BDIR="${PACKAGE}_${VERSION}" ARCH="armhf" MAINTAINER="lrrr <>" cat <<-EOF > /tmp/hw.c #include <stdio.h> int main(void){ printf("Hello world!\n"); return 0; } EOF mkdir -p ${BDIR}/usr/local/bin gcc -Wall /tmp/hw.c -o ${BDIR}/usr/local/bin/$PACKAGE mkdir -p ${BDIR}/DEBIAN cat <<-EOF > ${BDIR}/DEBIAN/control Package: $PACKAGE Version: $VERSION Section: base Priority: optional Architecture: $ARCH Maintainer: $MAINTAINER Description: Hello World When you need some sunshine, just run this small program! EOF dpkg-deb --build $BDIR # requires armbian SDK mod for /tmp/overlay (rw) mv -v ${BDIR}.deb /tmp/overlay rm -fr ${BDIR} hw.c
  11. @botfapIMO, users who cannot access ext4 fs need a GUI wizard but the tool should not be required for users who can access ext4 fs. It's feature creep, all because the average Armbian user cannot find a way to access the file system. There are ways to access ext4 from Windows (ext2fsd) and Mac (macfuse). Also, you have VM's and Linux Live USB/CD.
  12. @botfap A script generator would do most of the work, generate a config script, find offset in image and insert. Could be script based like yours or a statically linked binary, or dynamic linked with a GUI. One could do something similar with a static sized text file, such as armbian_first_run.txt, that is padded with whitespace instead of zeros. But armbian-firstrun-config doesn't do much. @tkaiser No filesystem required to mount, just rw access to the image file. I admit, it's hacky but doesn't require much changes to build. Just throwing some ideas out. I don't care if you make armbian fat, just add option to disable it in build so I don't have to fork code. Edit: armbian-firstrun-config does not do much but it does call (source) armbian_first_run.txt. Any code in the file will be exec on first boot. The txt file extension threw me off, thinking it was parsed.
  13. Here is a couple of more ways I was messing around with. 1) Create a static sized "binary" shell script on the image with a special header. Find the header and inject script. Simple working example. # Something like this would be added to official SDK. For testing add to userpatches/ # add 25k binary script ACI=/boot/ printf "#ARMBIAN_CUSTOMIZE_IMAGE_PLACEHOLDER" > $ACI OFFSET=$(du -b $ACI | awk {'print $1'}) dd if=/dev/zero of=$ACI bs=1 count=25k conv=notrunc seek=$OFFSET # modify armbian-firstrun-config and add txt file to exec $ACI sed -i 's/^do_firstrun_automated_user_configuration$/sh \/boot\/\ndo_firstrun_automated_user_configuration\n/' /usr/lib/armbian/armbian-firstrun-config touch /boot/armbian_first_run.txt # Bash script run on users host. Depends on dd and grep. IMAGE=$1 # parse image and get offset grep -abq "#ARMBIAN_CUSTOMIZE_IMAGE_PLACEHOLDER" $IMAGE if [ $? -ne 0 ]; then echo "Unable to find placeholder in $IMAGE" && exit 1 fi OFFSET=$(grep -Uabo "#ARMBIAN_CUSTOMIZE_IMAGE_PLACEHOLDER" $IMAGE | awk -F : {'print $1'}) # > /boot/ cat <<-EOF > #!/bin/sh -e echo "Deleting /root/.not_logged_in_yet" >> /root/log.txt rm -f /root/.not_logged_in_yet echo "Resetting root password" >> /root/log.txt chage -d 17790 root exit 0 EOF # inject script into image printf "Injecting script into $IMAGE (offset=0x%x)\n" $OFFSET dd of=$IMAGE bs=1 count=16k seek=$OFFSET conv=notrunc 2) Another way is to append extra blocks before first partition (after u-boot). Have armiban-firstrun-config read the block range with dd, verify config, and process. No example. Edit: seems like this thread is going in different direction. Have fun... but FAT?!?
  14. I would do something similar to Armbian SDK and userpatches/ Add script to setup chroot (mounts,qemu-static,etc) using pre-built image. For example, if userpatches/ exists, copy to chroot and exec or drop to chroot for manual configuration. Then, cleanup. It would be more versatile as you could exec binaries on the image, like dpkg-reconfigure, etc. You could even use armbian-config but hardware detection would be based on host hardware, not the target.
  15. Here is a slightly cleaner approach. Download lib.config,, to userpatches. Most options are already set in lib.config. The resulting image is close to a basic chroot install with the minimal armbian packages needed for booting. Options: REMOVE_SYSTEMD in to use systemd or not. PACKAGE_LIST* in lib.config will determine which armbian based configs are added to the image. There are a few optimizations, that might be of interest, which are not included. Some are located in the SDK under packages/bsp/common/usr/lib/armbian/*. There is an example of one optimization in the Only tested debian, with Orange Pi Zero and R1 boards. Last git commit used: be0778b. lib.config